I am using SQL Anywhere 16 and connecting to the same using jconn4.jar which is pure jdbc. I am exporting data using follow command
UNLOAD SELECT * FROM TABLE_NAME TO 'D:\sales.csv'
And want to import in same table of other schema. Using following query
INPUT INTO TABLE_NAME FROM 'D:\sales.csv' while I am executing the above query using java(jdbc) its giving following error Cause: java.sql.SQLException: SQL Anywhere Error -131: Syntax error near 'INPUT' on line 1
So can you please suggest solution so that i can import the same file using java rather than parsing/ reading csv file and then insering data row by row And same query is working fine on ineractive sql.
asked 22 Nov '13, 04:00
To import data exported with the UNLOAD command you might want to use the LOAD TABLE statement. INPUT, like OUTPUT, is only available within Interactive SQL (aka ISQL).
answered 22 Nov '13, 06:40