By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,287 Members | 1,309 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,287 IT Pros & Developers. It's quick & easy.

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

P: 1
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
Share this Question
Share on Google+
1 Reply

P: 6
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.