开发者

Specify rowterminator when creating a file with SQLCMD

How do you specify the the row terminator when outputting query results using sqlc开发者_运维问答md?

bcp is not an option.

sqlcmd -E -s"   " -Q "Select * From SomeTable" -o C:\Output.txt  -W

What is the default row terminator?


You can only choose column separator with -s. There is not option to specify row terminator.

So it is CR + LF because the output goes to command line. However, data may be truncated so you have to control the output width.

See sqlcmd for -s, -w, -W, -y, -Y etc

bcp may not be an option, as you say, but neither is row terminator in sqlcmd...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜