cancel
Showing results for 
Search instead for 
Did you mean: 

truncate a udb table

0 Kudos

We are trying to truncate a udb table by issuing an IMPORT command. The command works fine from IBM's Control Center, as well as TOAD. However, when we put the IMPORT command in a script in a Data Integrator job, it fails with the following message. Any suggestions?

5452 5928 DBS-070401 9/7/08 9:09:38 PM ODBC data source <UATDM> error message for operation <SQLNumResultCols>: <[IBM][CLI Driver] CLI0125E Function sequence error.

5452 5928 DBS-070401 9/7/08 9:09:38 PM SQLSTATE=S1010>.

5452 5928 RUN-050304 9/7/08 9:09:38 PM |Session New_Job1

5452 5928 RUN-050304 9/7/08 9:09:38 PM Function call <sql ( DS_Policy_Data_Mart, IMPORT FROM NUL OF DEL REPLACE INTO T9EXC ) > failed, due to error <70401>: <ODBC

5452 5928 RUN-050304 9/7/08 9:09:38 PM data source <UATDM> error message for operation <SQLNumResultCols>: <[IBM][CLI Driver] CLI0125E Function sequence error.

5452 5928 RUN-050304 9/7/08 9:09:38 PM SQLSTATE=S1010>.>.

Accepted Solutions (1)

Accepted Solutions (1)

peter_houston
Explorer
0 Kudos

I tried to execute this and am getting a similar error. The only other thing I can think of is to create a stored procedure and call it instead of the IMPORT command.

[Truncate stored procedure|http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.apdv.sample.doc/doc/admin_scripts/s-truncate-db2.htm]

Answers (1)

Answers (1)

peter_houston
Explorer
0 Kudos

Hi Mitchell,

I responded to your other post before seeing this one.

What syntax are your using for the sql function? Do you have single quotes around the data store and sql statement?

sql ('DS_Policy_Data_Mart', 'IMPORT FROM NUL OF DEL REPLACE INTO T9EXC' );

-Peter