关于SybaseIQ导出data的例子很少,在这里分别用三种方法output出data,与大家分享.
[@more@]/*
select * from gz_user.bill_test;
select * from gz_user.bill_test;
select 1;
output to /home/sybase/billliang/script/bill3.txt
format ascii
delimited by '|'
quote ''
;
commit;
*/
/*
select * from gz_user.bill_test
># bill2.dat
commit;
*/
set temporary Option Temp_Extract_Append = 'ON';
set temporary option temp_extract_name1 = '/home/sybase/billliang/script/bill3.txt';
set temporary option temp_extract_name2 = '';
set temporary option temp_extract_column_delimiter = '|';
commit;
select * from gz_user.bill_test;
select * from gz_user.bill_test2;
commit;
==============
调度这脚本的命令是:
dbisql -c "uid=gz_user;pwd=password" -d1 bill.sql
dbisqlc -c "uid=gz_user;pwd=password" -q bill.sql
dbisql与dbisqc是有区别的,慢慢体会吧.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/640706/viewspace-1022284/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/640706/viewspace-1022284/