If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > SQL0206N SQLSTATE=42703. Please help!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-16-11, 04:15
kellenliu kellenliu is offline
Registered User
 
Join Date: Aug 2011
Posts: 1
SQL0206N SQLSTATE=42703. Please help!

I'm new to DB2. I've created a sample procedure:

connect to SAMPLE
@
DROP PROCEDURE SP_BI_DEMO ()
@

CREATE PROCEDURE SP_BI_DEMO()
DYNAMIC RESULT SETS 0

BEGIN
CALL SYSPROC.ADMIN_CMD ('LOAD FROM (SELECT concat("0000" , FLD1) , FLD2 FROM T_SOURCE) OF CURSOR REPLACE INTO T_TARGET');

END
@

CONNECT RESET
@

--------------------------------
When executing the procedure, the system returns
SQL0206N "0000" is not valid in the context where it is used. SQLSTATE=42703".

Can anyone tell me what went wrong? Thanks.
Reply With Quote
  #2 (permalink)  
Old 08-16-11, 04:20
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
concat("0000" , FLD1)
if " db2 handles this as column name
if this is a literal use ' instead
all basics for db2 can be found at
IBM DB2 9.5 Information Center for Linux, UNIX, and Windows
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On