Hoe do I export CSV File from a query executed in ISQL (ODBC)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2017 09:50 AM
I can run a query using ISQL and export the data to a flat file thusly:
"C:\Program Files\ServiceNow\ODBC\tools\odbcisql.exe" -c 101B-DATA.txt > 101B-DATA-OUTPUT.txt
where the command file contains the connect statement and the query. However, the output is not a strict CSV ...
- sometimes the fields are tab separated, sometimes not
- some text strings are very long and may contain control characters like CRLF, etc ..
Has anybody had success in getting ISQL to push out CSV output?
- Labels:
-
Personal Developer Instance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2017 09:55 AM
Hi Andrew,
Please check the thread below. hope it will help you.
How to redirect ODBC output into a flat file??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2017 10:03 AM
Thank you harsh ... I read that post and can successfully get the data into a flat file, but as I indicated in the question, the flat file structure is not a CSV file
- sometimes the fields are tab separated, sometimes not
- some text strings are very long and may contain control characters like CRLF, etc
I cannot use the CSV Web Service because I am debugging the integration of RSA Archer which runs a SQL query to obtain server, application, and relationship data ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2017 04:57 AM
Andrew,
Perhaps the SnowMirror tool might help you. It has a backup feature into CSV or native XML as well.
SnowMirror | The Smart Data Replication Tool for ServiceNow
Regards,
Pavel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2017 01:48 PM
Hi Andrew,
Not sure if this helps! Just wanted to share in case it might provide insight about your question: ODBC driver
Best,
Shivani Patel
If you feel that your question was answered, we would greatly appreciate if you could mark the appropriate thread as "Correct Answer". This allows other customers to learn from your thread and improves the ServiceNow Community experience.