Hi,
I am trying to migrate a database from Sybase to db2. My DB2 version is 'v8.1.11.973' FixPack 11. I have unloaded the data into files and am trying to import it in my db2 database in a C++ program. The code looks like this:
sSQL.Format("import from 'f:/unload/%d.dat' of del modified by coldel^ commitcount 5000 messages 'f:/unload.txt' insert into SMART_GROUP.%s;",nTableID,(LPCSTR)tableName);
{
DBExt.GetCon().ExecuteSQL(sSQL);
}
That is of course in a loop. I am receiving the following errror - sql0007n - 'The character "^" following " del modified by coldel" is not valid'.I don't get this error when I execute the same command in the Command Editor. When I change the column delimiter to ',' I get the error - SQL0104N 'An unexpected token "import" was found following "BEGIN-OF-STATEMENT".' . I just read somewhere that it is impossible to import data through ODBC, I guess that is the problem. So my question is how can I do a mass storage import in DB2?
Thanks in advance,Emil