Focal Point
[CLOSED] inserting record from webfcous to teradata tables

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9597063576

March 31, 2015, 07:50 AM
pooja
[CLOSED] inserting record from webfcous to teradata tables
Hi,
i have master file called item which is created from the csv file. i want to insert the item records in to the teradata table which has same structure as of master file item. But i am uable to do it. The below one is my approach. Kindly help on this.

it is working when i insert the harcode value like this
INSERT INTO DLBIS_ADHOC_TEAM.ITEM_MERGE VALUES('038','05','0416','037','05','0663');

it is not wrking when i try like below
ENGINE SQLDBC SET DEFAULT_CONNECTION INVOBIS
SQL SQLDBC
INSERT INTO DLBIS_ADHOC_TEAM.ITEM_MERGE
SELECT FROM_DEPT ,FROM_CL ,FROM_ITEM, TO_DEPT,TO_CL, TO_ITEM FROM ITEM;
END


TABLE FILE SQL_HOLD_S
PRINT *
END
-EXIT

Please help meSmiler

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8
Windows, All Outputs
March 31, 2015, 08:18 AM
MartinY
Which error do you get, if so ?

What are the format of the fields in your item master file ? When you do it manually you are inserting characters, are you doing the same from the other process ?


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
March 31, 2015, 01:02 PM
pooja
Hi Martin,

the format of the fields in the item master file is A10. And the format of the teradata table column is also var char(10).
i get error saying that thet item procedure is not identified.

please suggest me


WebFOCUS 8
Windows, All Outputs
March 31, 2015, 01:25 PM
MartinY
It may not be important, but A10 is not "necessarily" the same thing as varchar(10).

A10 is more than a char(10) which is a fixed length where varchar(10) is A10V if we want to be specific. But it's probably not your issue.

First, try to execute the SELECT ... FROM ITEM alone which is seems to be where the issue is from to be sure that it works.

Second, search for the received error on TechSupport when trying to insert in DB. Maybe you'll have other ways to investigate and resolve. Always better to do it step by step.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007