What are the options to import XML data, which have been generated by a select for xml auto? I managed to use a simple approach using the Load Table statement, but I don't like the restriction, that Load Table will require an exclusive lock on the table.

Using openxml I don't like the necessity to provide all column types.

Is there a more easy way to insert the data generated with XML auto?

asked 30 Aug '12, 10:30

Martin's gravatar image

accept rate: 14%

Hi Martin,

i am also waiting for the above answer,if you get anytime answer for the above question please forward to me.

My requirement:-I have one xml data i need to import the data into SQL Anywhere,how to do achive this one,i am new to this sql anywhere,please help me out.

Thnaks, Syam.

(25 Sep '12, 02:37) Syam
Replies hidden

A good starting point is http://infocenter.sybase.com/help/topic/com.sybase.help.sqlanywhere.12.0.1/dbreference/load-table-statement.html

If you need more specific help, ask a question in this forum

(25 Sep '12, 03:15) Martin

Hi Martin,

Thanks for quick replay.

i am understanding what you suggested regarding importing data xml to sql anywhere,but here i want know how to achive the sql anywhere servee. if you have any documets can you share it it would be helpful it for me.

(25 Sep '12, 07:58) Syam
Replies hidden

FWIW, the official SQL Anywhere documentation for current versions can be found here:


(25 Sep '12, 08:08) Volker Barth

As we have customers with older SA versions than 12, we didn't use load table with xml data as that is not available before. We always used OpenXML and to my knowledge it's necessary there, to provide the data types for all columns.
But if you already found a solution importing with load table, then why not using it to fill a global temporary table?
You would have to create a temporary table for every base table you want to import xml data (easily copied with Sybase Central). In the first step you would use the load table command to fill the temporary table and after that issue an "insert into base table select from temptable". Exclusive Locks shouldn't be a problem with temporary tables.
Could you provide an example for a xml import with load table?

permanent link

answered 01 Oct '12, 07:13

Markus%20D%C3%BCtting's gravatar image

Markus Dütting
accept rate: 30%

Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 30 Aug '12, 10:30

question was seen: 1,904 times

last updated: 01 Oct '12, 07:13