Hi everyone,
I am trying to load some data into a DB2 table on AS/400. I am checking option of creating the table in the ODBC stage. But it is giving errors.
testMMScreate..DBAPVEN_MMS_AS.lnkDBAPVEN_AS: DSD.BCIOpenW call to SQLExecDirect failed.
CREATE TABLE TRO/DBAPVEN1(VENDOR_GROUP CHAR(4) NOT NULL, VENDOR CHAR(9) NOT NULL PRIMARY KEY)
SQLSTATE=S1000, DBMS.CODE=-5016
[DataStage][SQL Client][ODBC][DataDirect][ODBC DB2 Wire Protocol driver][UDB DB2 for iSeries and AS/400]Unknown error: SQLCODE -5016
When I checked the option, it created the DDL as below:
CREATE TABLE #$MMSLib#/DBAPVEN1(VENDOR_GROUP CHAR(4) NOT NULL, VENDOR CHAR(9) NOT NULL PRIMARY KEY);
Is there anything wrong I am doing?
Thanks in advance,
Error in creating a DB2 table
Moderators: chulett, rschirm, roy
Have you tried entering this SQL directly to see if the same error occurs - and if it might give more output?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
mouthou :
Are you sure you were able to create the table ?
But when I tried to run your query
but i got following error
I guess "/" is the problem, that is why datastage throws error
Are you sure you were able to create the table ?
But when I tried to run your query
Code: Select all
CREATE TABLE user2/DBAPVEN1(VENDOR_GROUP CHAR(4) NOT NULL, VENDOR CHAR(9) NOT NULL PRIMARY KEY)
Code: Select all
SQL0104N An unexpected token "/" was found following "CREATE
TABLE user2". Expected tokens may include: "OF
I guess "/" is the problem, that is why datastage throws error