cancel
Showing results for 
Search instead for 
Did you mean: 

Getting request-level logging output into Excel

Former Member
2,067

I am trying to get a request-level log file into Excel 2007.

Right now I do the following, but while it catches most fields (the quotes in SQL statements cause problems) there are still some messed up. I suspect I could do better with the OUTPUT statement. Does anyone have an OUTPUT they use?

call sa_get_request_times('mydb.rll');
select * from satmp_request_time ORDER BY millisecs desc;
output to 'mydb.csv'
with column names
delimited by ','
quote '"' all
format text;

Accepted Solutions (1)

Accepted Solutions (1)

johnsmirnios
Participant

A few suggestions:

1) See http://sqlanywhere-forum.sap.com/questions/709/what-are-my-options-to-export-query-results-as-excel-...

2) Try ESCAPES OFF (UNLOAD supports it, presumable OUTPUT does too). As far as I can tell, Excel CSV does not support escapes.

3) Try using XML as the intermediate file.

Former Member
0 Kudos

I ended up using this OUTPUT (a non-standard delimiter that appears nowhere in my result set) (hack):

output to 'test.csv' delimited by '!' escapes off with column names format text

Then in Excel, import using Data > From Text and make sure the delimiter and quote character (single quote, the OUTPUT default) match.

Answers (0)