开发者

How to export data from an ancient SQL Anywhere?

开发者 https://www.devze.com 2023-03-13 05:13 出处:网络
I\'m tasked with exporting data from an old application that is using SQL Anywhere, apparently version 5, maybe 5.6. I never worked with this database before so I\'m not sure where to start here. Does

I'm tasked with exporting data from an old application that is using SQL Anywhere, apparently version 5, maybe 5.6. I never worked with this database before so I'm not sure where to start here. Does anybody have a hint?

I'd like to export it in more or less any text representation that then I can开发者_JAVA百科 work with. Thanks.


I ended up exporting the data by using isql and these commands (where #{table} is each of the tables, a list I built manually):

SELECT * FROM #{table};
OUTPUT TO "C:\export\#{table}.csv" FORMAT ASCII DELIMITED BY ',' QUOTE '"' ALL;
SELECT * FROM #{table};
OUTPUT TO "C:\export\#{table}.txt" FORMAT TEXT;

I used the CVS to import the data itself and the txt to pick up the name of the fields (only parsing the first line). The txt can become rather huge if you have a lot of data.


Have a read http://www.lansa.com/support/tips/t0220.htm

0

精彩评论

暂无评论...
验证码 换一张
取 消