How to use TAB as column separator in SQLCMD

后端 未结 11 1272
后悔当初
后悔当初 2020-12-16 17:36

SQLCMD supports the -s parameter to specify the column separator, but I couldn\'t figure how how to represent the tab (CHAR(9)) character. I have tried the following but bo

11条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-16 18:13

    A similar answer to one posted above, but it's simpler in a way that I think is significant.

    1. Open your text editor
    2. Press Tab
    3. Highlight the chunk of whitespace (the tab) created
    4. Copy and paste that into the spot in your SQL command

    Even though this tab is represented as a wide chunk of whitespace, it is a single character.

    The other answer had some unnecessary stuff about pasting the whole command with "" in it. I think that throws people off (it certainly threw me off).

提交回复
热议问题