Page 1 of 2
problem with Sql code -206
Posted:
Mon Mar 11, 2013 8:33 pm
by Dashimir
DSNX200I & BIND SQL ERROR
DBRM=program
STATEMENT=438
SQLCODE=-206
SQLSTATE=42703
TOKENS=number
CSECT NAME=xxxxx
RDS CODE=-100
DSNT233I & UNSUCCESSFUL BIND FOR
EXEC SQL
SELEC number
INTO :number
FROM table
WHERE this = :that
END-EXEC.
Re: problem with Sql code -206
Posted:
Mon Mar 11, 2013 8:42 pm
by Dashimir
Thank you in advance for your help.
Re: problem with Sql code -206
Posted:
Mon Mar 11, 2013 8:52 pm
by prino
And opening a manual, or typing "sqlcode -206" in Google didn't give you any clues?
Re: problem with Sql code -206
Posted:
Mon Mar 11, 2013 8:55 pm
by enrico-sorichetti
what happened when You googled for
sqlcode 206 sqlstate 42703
or looked at the manual Yourself ???
Re: problem with Sql code -206
Posted:
Mon Mar 11, 2013 9:14 pm
by c62ap90
-206 Column does not exist in any table of the SELECT.
Re: problem with Sql code -206
Posted:
Mon Mar 11, 2013 9:33 pm
by Dashimir
''In the case of a SELECT or DELETE statement, the specified column is not a column of any of the tables or views identified in a FROM clause in the statement''. I googled it and i found this but it is indentified.
Re: problem with Sql code -206
Posted:
Mon Mar 11, 2013 11:17 pm
by NicC
What is "indentified"? Are you magically expecting Google or soemone to say which column specified in the SELECT is not in any of the tables specified in the SELECT? If that is the case then you are in the wrong job. YOU have to do the hard work of checking the spelling etc. (It would have taken less time than it took to write and post your problem.)
Also, as it appears to not be a COBOL problem I have moved it to a more appropriate place. Please think about where to post in future.
Re: problem with Sql code -206
Posted:
Tue Mar 12, 2013 6:37 pm
by Dashimir
I checked all columns many times, it also said that the token is the ''numbers'' variable whitch i checked even more times.
Re: problem with Sql code -206
Posted:
Tue Mar 12, 2013 6:50 pm
by enrico-sorichetti
IIRC
the variable name CAN NOT be equal to the column name
Re: problem with Sql code -206
Posted:
Tue Mar 12, 2013 7:03 pm
by Dashimir
u right it is
number_thing
table-number-thing