problem with Sql code -206



IBM's flagship relational database management system

problem with Sql code -206

Postby Dashimir » Mon Mar 11, 2013 8:33 pm

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.                                             
Dashimir
 
Posts: 42
Joined: Wed Dec 26, 2012 7:27 pm
Has thanked: 2 times
Been thanked: 0 time

Re: problem with Sql code -206

Postby Dashimir » Mon Mar 11, 2013 8:42 pm

Thank you in advance for your help.
Dashimir
 
Posts: 42
Joined: Wed Dec 26, 2012 7:27 pm
Has thanked: 2 times
Been thanked: 0 time

Re: problem with Sql code -206

Postby prino » Mon Mar 11, 2013 8:52 pm

And opening a manual, or typing "sqlcode -206" in Google didn't give you any clues?
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: problem with Sql code -206

Postby enrico-sorichetti » Mon Mar 11, 2013 8:55 pm

what happened when You googled for
sqlcode 206 sqlstate 42703

or looked at the manual Yourself ???
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: problem with Sql code -206

Postby c62ap90 » Mon Mar 11, 2013 9:14 pm

-206 Column does not exist in any table of the SELECT.
c62ap90
 
Posts: 125
Joined: Thu Oct 11, 2012 10:24 pm
Has thanked: 1 time
Been thanked: 7 times

Re: problem with Sql code -206

Postby Dashimir » Mon Mar 11, 2013 9:33 pm

''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.
Dashimir
 
Posts: 42
Joined: Wed Dec 26, 2012 7:27 pm
Has thanked: 2 times
Been thanked: 0 time

Re: problem with Sql code -206

Postby NicC » Mon Mar 11, 2013 11:17 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: problem with Sql code -206

Postby Dashimir » Tue Mar 12, 2013 6:37 pm

I checked all columns many times, it also said that the token is the ''numbers'' variable whitch i checked even more times.
Dashimir
 
Posts: 42
Joined: Wed Dec 26, 2012 7:27 pm
Has thanked: 2 times
Been thanked: 0 time

Re: problem with Sql code -206

Postby enrico-sorichetti » Tue Mar 12, 2013 6:50 pm

IIRC
the variable name CAN NOT be equal to the column name
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: problem with Sql code -206

Postby Dashimir » Tue Mar 12, 2013 7:03 pm

u right it is

number_thing
table-number-thing
Dashimir
 
Posts: 42
Joined: Wed Dec 26, 2012 7:27 pm
Has thanked: 2 times
Been thanked: 0 time

Next

Return to DB2

 


  • Related topics
    Replies
    Views
    Last post