467,189 Members | 1,320 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,189 developers. It's quick & easy.

"I" is not valid in the context it is used - db2 command line sql

Hi there, trying to execute a db2 sql statement from a command line from UNIX. Here is the command I'm running

db2 export to /work/ftp/lt/sku_insert.csv of del select digits'('UPC_NO')', UPC, ITEM_DESC_SHORT, VENDOR_NO, SHOES, VENDOR_PID, VENDOR_PID_DESC, WOMENS, DEPT_NO, SPACE,SPACE1, VENDOR_COLOR_DESC, SIZE_DESC_SHOES, SPACE2, CLASS_NO, SPACE3, SPACE4, NRF_COLOR_DESC, VENDOR_SIZE_DESC, SPACE5, SPACE6, SPACE7, SPACE8, SPACE9, SPACE10, SPACE11, 'I' as change_flag from ltp.rfd_shoe_loc a where not exists '('select 1 from ltp.rfd_shoe_loc_temp b where a.upc_no = b.upc_no')'

The errors returned to me are
SQL3022N An SQL error "-206" occurred while processing the SELECT string in
the Action String parameter.
SQL0206N "I" is not valid in the context where it is used. SQLSTATE=42703


I can't figure out what's wrong with my statement, anyone see anything obvious that I am missing?
Aug 30 '07 #1
  • viewed: 7175
Share:
1 Reply
The only obvious thing I can see is the single quotes around ( and ) characters.
Do not use quotes here.
So it should be: .. digits(upc_no)
and: ... not exists ( select ...
Nov 2 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by hvaisane@cc.joensuu.fi | last post: by
1 post views Thread by laredotornado@zipmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.