SQL0206N & SQLSTATE=42703 ..not valid in the context err

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Developer9
Premium Member
Premium Member
Posts: 187
Joined: Thu Apr 14, 2011 5:10 pm

SQL0206N & SQLSTATE=42703 ..not valid in the context err

Post by Developer9 »

Hi Everyone,

I am using DB2 API stage to read the data with with "custom sql query"..

Code: Select all

job..EMP_MTH: [IBM][CLI Driver][DB2/AIX64] SQL0206N  "PRD_LN" is not valid in the context where it is used.  SQLSTATE=42703SQL0206N  "PRD_LN" is not valid in the context where it is used.  SQLSTATE=42703
I verified schema name and owner name ..Its Strange for one table its giving this type of error out of 30-40 tables I used the same way .
More particularly ,when I give table name as Parameter (Given parameter :EMP_MTH=EMP_M01 )..why this is happening any :idea:

Code: Select all

"SELECT EMP_NO,....CCS.EMP_M01 "..Working fine

"SELECT EMP_NO,....CCS.EMP_MTH "...Giving error 
Thanks for the Input
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

The SQL0206N error indicates that the PRD_LN column does not exist in the table you queried, which is EMP_MTH. Apparently that column exists in the other tables. You can check by using DB2 command line, the DB2 client, or by importing the metadata from that table into DataStage.
Choose a job you love, and you will never have to work a day in your life. - Confucius
Post Reply