Page 1 of 1

getting error in DB2UDB enterpise stage while doing upsert

Posted: Mon Sep 06, 2010 2:43 am
by kalpanam
Hi

I am trying to update data from a Dataset to a DB2/UDB stage . It is having Internet_order_nbr(decimal(9,0) key column) and Orderkey(integer(10)) and doing upsert by giving Autogenerated mode as "upsert".After specifying the properties for the DB2 stage. It's giving an error "The schema does not contain the specific field ORDER_KEY;
this field is used as an insert, update, or delete key."

Can anybody help me on this.

Posted: Mon Sep 06, 2010 2:47 am
by ray.wurlod
The schema does not contain the field ORDER_KEY mentioned in your SQL. Perhaps you need to qualify the table name with the correct schema name.

Posted: Mon Sep 06, 2010 2:55 am
by kalpanam
ray.wurlod wrote:The schema does not contain the field ORDER_KEY mentioned in your SQL. Perhaps you need to qualify the table name with the correct schema name. ...
Yes below my Insert and Update statements given:

INSERT INTO CDW.CS_ORDER_FACT (INTERNET_ORDER_NBR, ORDER_KEY) VALUES (ORCHESTRATE.INTERNET_ORDER_NBR, ORCHESTRATE.ORDER_KEY)

UPDATE CDW.CS_ORDER_FACT SET ORDER_KEY = ORCHESTRATE.ORDER_KEY WHERE (INTERNET_ORDER_NBR = ORCHESTRATE.INTERNET_ORDER_NBR)

Apart from this how can i give schema name?

Posted: Mon Sep 06, 2010 3:09 am
by ETLJOB
Did you try to Insert/Update data using any database access tool? If yes, was that successful?

Just to make sure you are not making any mistakes with schema/table/column names.

Posted: Mon Sep 06, 2010 3:36 am
by kalpanam
ETLJOB wrote:Did you try to Insert/Update data using any database access tool? If yes, was that successful?

Just to make sure you are not making any mistakes with schema/table/column names.
Yes I'm using IBM Data Studio2.2 to access,insert and updating table,it was successful in doing that operation with this tool..

Posted: Mon Sep 06, 2010 4:27 am
by ArndW
Is your CS_ORDER_FACT Table in schema CDW your intended target?

Can you make a quick test job to read the CDW.CS_ORDER_FACT table from DataStage to see if that works?