Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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 '>'

asked 07 Oct '11, 13:12

Jon's gravatar image

Jon
25226
accept rate: 0%

edited 07 Oct '11, 14:46


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.

permanent link

answered 07 Oct '11, 15:01

Mark%20Culp's gravatar image

Mark Culp
24.9k10141297
accept rate: 41%

2

To add:

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

(07 Oct '11, 16:30) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×86
×41
×18

question asked: 07 Oct '11, 13:12

question was seen: 3,673 times

last updated: 07 Oct '11, 16:30