Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in August and this forum will be retired.

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;

asked 02 Feb '12, 15:39

Tom%20Slee's gravatar image

Tom Slee
accept rate: 29%

A few suggestions:

1) See

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.

permanent link

answered 03 Feb '12, 10:04

John%20Smirnios's gravatar image

John Smirnios
accept rate: 37%

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.

(06 Feb '12, 11:27) Tom Slee
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]( "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: 02 Feb '12, 15:39

question was seen: 1,910 times

last updated: 06 Feb '12, 11:27