If you're using Windows Server 2008 R2:
- Click Start -> Control Panel
- Click Clock, Language, and Region
- Click Change the date, time, or number format
- Click the Additional settings... button
- In the List separator field, replace ',' with '|'
- Click Apply
- Click OK
- Click OK
- Open SQL Management Studio and execute your query
- Write click in the Results window and select Save Results As...
- Select the appropriate directory path
- For File name:, enter an appropriate filename
- For Save as type:, select CSV (Comma delimited)
- Click Save
- You may now open the file in Notepad and confirm that the output is indeed pipe-delimited as opposed to comma-delimited
Once you have the pipe-delimited output you desire, the procedure to reset back to comma delimited is as follows:
- Click Start -> Control Panel
- Click Clock, Language, and Region
- Click Change the date, time, or number format
- Click the Additional settings... button
- In the List separator field, replace '|' with ','
- Click Apply
- Click OK
- Click OK
The procedures will be slightly different for other MS operating systems, but the concept will be the same.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.