cancel
Showing results for 
Search instead for 
Did you mean: 

Java app Export from Sybase IQ table errors

Former Member
0 Kudos
4,023

I am writing a java app that is connecting to a Sybase IQ instance. I am using the iAnywhere JDBC driver that came with SQL Anywhere 11 (jodbc.jar). In my java project I am using jodbc.jar from SQL Anywhere 11. My connection string is pretty simple. "jdbc:ianywhere:DSN=dw". I want to be able to 'export' a table. Both unload and output redirection result in errors.

unload table #test to '\\servertest_bcp.out';

results in the following error: [Sybase][ODBC Driver][Sybase IQ]Feature 'unload from non-SQL Anywhere tables' not implemented

select * from #test >#U:test_bcp.out; [Sybase][ODBC Driver][Sybase IQ]Syntax error near '>'

Accepted Solutions (1)

Accepted Solutions (1)

MarkCulp
Participant

I think the UNLOAD error message is pretty clear - when you are connected to an IQ server you cannot use the UNLOAD statement to unload any table except tables stored in SYSTEM (i.e. tables that reside in the SQL Anywhere store). The reason is because the IQ piece of the server (where your table is stored) does not support the UNLOAD statement.

Regarding your error using '>' redirection - The issue is that '>' is not understood by the server - it is the shell that handles output redirection of stdout from an application. Note also that older versions of dbisql also handled a form of '>' redirection - see the tip mentioned on this page about exporting data.

VolkerBarth
Contributor

To add:

In case you can use dbisqlc against Sybase IQ to export data: John has documented the output redirection in detail here...

Answers (0)