-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output data is not easy to parse #539
Comments
What if we were to define an environment var like Maybe sqlcmd could encode CSV, though even within CSV there are a bunch of corner cases that some applications and parsers disagree on how to handle. |
An interesting approach. A thing to consider: I usually execute sql files (with |
SQL Server is going to output XML if you use |
I see. What would |
do you have an example of XML content being truncated after using The only thing |
Here is an example of an output XML created as follows in interactive mode: :XML ON
SELECT * FROM TBL_FJ_TEST FOR XML AUTO
GO The file is cut off at column (character) 2034, it seems a newline character is inserted? |
In CLI mode, the returned data sometimes needs to be used in scripts or automation.
It therefore would be nice if the returned data would be easily parse-able. It would be nice if an output format could be selected, like CSV, JSON, XML, etc.
I'm aware that I could define a separator in horizontal output format. But unfortunately the output values won't be returned with quotes if the values themselves contain the separator character, making the parsing a big pain.
The text was updated successfully, but these errors were encountered: