Db2 Import command as before SQL
Posted: Tue Oct 05, 2004 8:36 am
Hello,
I am trying to truncate a table using the DB2 import command (importing an emprty file into the table)
The command works fine at the Command Center and Db2 prompt.
But when I try to run it as a "before SQL" statement I get this error :
[IBM][CLI Driver][DB2/AIX64] SQL0104N An unexpected token "from" was found following "import ". Expected tokens may include: "JOIN <joined_table>". SQLSTATE=42601
Executing SQL statement 'import from empty of del replace into <tablename>'
Anyone else encountered this problem ?
Actually my table has more than 40 million rows - so I dont want to do a delete from on it but use this command instead.
Any inputs are appreciated.
Thanks
-Xan
I am trying to truncate a table using the DB2 import command (importing an emprty file into the table)
The command works fine at the Command Center and Db2 prompt.
But when I try to run it as a "before SQL" statement I get this error :
[IBM][CLI Driver][DB2/AIX64] SQL0104N An unexpected token "from" was found following "import ". Expected tokens may include: "JOIN <joined_table>". SQLSTATE=42601
Executing SQL statement 'import from empty of del replace into <tablename>'
Anyone else encountered this problem ?
Actually my table has more than 40 million rows - so I dont want to do a delete from on it but use this command instead.
Any inputs are appreciated.
Thanks
-Xan