Informix Find Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us
Finderr
Learn more about Stack Overflow the company Business Learn more about hiring developers sql error or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow sqlcode Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Informix ERROR: A syntax error has occurred. Error https://www.ibm.com/support/knowledgecenter/SSGU8G_11.70.0/com.ibm.em.doc/errors.html Code: -201 up vote 1 down vote favorite The only statement in my SQL code is DEFINE p_starttime DATETIME YEAR TO SECOND; I get this error from Informix 10.5: ERROR: A syntax error has occurred. Error Code: -201 Query = DEFINE p_starttime DATETIME YEAR TO SECOND Anybody has a clue why this might be happening? It's such a simple statement. informix share|improve this question asked Jun 28 http://stackoverflow.com/questions/11251060/informix-error-a-syntax-error-has-occurred-error-code-201 '12 at 18:50 Baris Seker 9818 You need to explain what you are trying to do. You can only define variables in the context of a stored procedure. You need to explain which language or program you are using to access the database. The CREATE FUNCTION statement might have failed for many different reasons. (Also, as a matter of interest, there never was a version 10.5 of Informix; the versions went 9.40, 10.00, 11.10, 11.50, 11.70. Which version of what are you using, on which platform?) –Jonathan Leffler Jun 29 '12 at 16:34 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote It's not valid SQL, as simple as that. DEFINE is not a keyword you can use in a query. It is part of the Stored Procedure Language, or SPL syntax, ie: CREATE FUNCTION foo(); DEFINE p_starttime DATETIME YEAR TO SECOND; -- do stuff RETURN p_starttime; END FUNCTION; share|improve this answer answered Jun 28 '12 at 21:35 RET 7,84212027 This gives an error too: ERROR: A syntax error has occurred. Error Code: -201 Query = CREATE FUNCTION foo() –Baris Seker Jun 29 '12 at 7:26 Sorry, that w
file citoxmsg.pam is missing from the directory $INFORMIXDIR/msg. Is this exists in your $INFORMIXDIR/msg ? -- Tsutomu Ogiwara from Tokyo Japan. ICQ#:168106592 >From: "ar"