471,089 Members | 1,115 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,089 software developers and data experts.

"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
1 7680
ties
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.

Similar topics

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.