2
votes

I'm new to db2. The following:

Import from 'c:\temp\devtest.del' of del insert into devtestone(col1,col2) 

Gives the error:

15:13:51 [IMPORT - 0 row(s), 0.000 secs] [Error Code: -104, SQL State: 42601] DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=Import from 'c:\temp\devtest.del' of del;BEGIN-OF-STATEMENT;, DRIVER=3.57.82 ... 1 statement(s) executed, 0 row(s) affected, exec/fetch time: 0.000/0.000 sec [0 successful, 0 warnings, 1 errors]

1
It appears you're running the command from a DB2 administration utility other than a plain old DB2CMD command shell. Depending on the program, you may need to switch the backslash characters to forward slashes, and you may need to get rid of the quotes surrounding the input file name.Fred Sobotka

1 Answers

3
votes

IMPORT is not an SQL statement, it is a command.

Based on the error message, you're trying to execute the import from some utility that connects to DB2 using JDBC drivers. If you want to execute the import utility from an application other than DB2 Command Editor / DB2 Command Window, you need to use the ADMIN_CMD wrapper. This is documented here: IMPORT command using the ADMIN_CMD procedure.