Quantcast
Channel: SCN: Message List - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 3587

Re: export data using the output command from interactive sql

$
0
0

Both bcp and isql can create rows where columns are separated by tab.

 

This typically suffices for exporting to excel etc.

You can also use some other character like '|" pipe symbol or "~" tilde etc. to separate columns.  When you import in excel you can use that as a column separator.

 

For bcp use character mode output, tab is default column separator.

For isql space is the default column separator

 

If you want to use different column separator (e.g. "|" ) then

for bcp use  -c -t '|' option

for isql use  -s '|'  option

 

 

Output of isql and bcp can be directed into a file. Similar to what you describe above.

 

You can also easily script wrappers to accept server, database and table/view names to run for a specific purpose.

 

HTH

 

Avinash


Viewing all articles
Browse latest Browse all 3587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>