Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

JSON export from sqlcmd is cut off and does not finish file

$
0
0

I am trying to run sqlcmd that outputs to json. However, I am getting almost all of the json, but it cuts off and does not finish.

So for example, instead of:

JavaScript
[{"barcode_note":"0000339269","barcode_guestid":392},{"barcode_note":"0000338801","barcode_guestid":8480},{"barcode_note":"00001953","barcode_guestid":1455}]

I'm basically getting the following:

JavaScript
[{"barcode_note":"0000339269","barcode_guestid":392},{"barcode_note":"0000338801","barcode_guestid":8480},{"barc

My sqlcmd is the following (I redacted private info):

Batchfile
SQLCMD -S <SERVERNAME> -d <Database1> -E -i C:\converttojson.sql -o C:\exportedstuff.json -h-1

My SQL is:

SQL
/****** ******/SETNOCOUNTONSELECT[barcode_note],[barcode_guestid]FROM[Database1].[dbo].[tbl_barcode]FORJSONAUTO;

Any help would be greatly appreciated! If I need to...

<<

Viewing all articles
Browse latest Browse all 4871

Trending Articles



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