October 3, 2011 at 7:30 am
Hi,
I have inserted a text which contains few newline characters in a column whose datatype is nvarchar.
When I select the column it returns as:
$$$$ =ZCFXL("Abietic acid.",R6C1) csCF1100/01110815482D 23 25 0 0 0 0 0 0 0 0999 V2000 2.1123 1.3156
But when I open the table from object explorer it contains the data in actual format as shown below:
$$$$
=ZCFXL("Abietic acid.",R6C1)
csCF1100/01110815482D
23 25 0 0 0 0 0 0 0 0999 V2000
2.1123 1.3156
Please let me know how to select the data in the format as i inserted into the table.
Thanks
October 3, 2011 at 7:36 am
When you select are you using SSMS? If so you need to change your output to text instead of grids. The grid does not show carriage returns.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
October 3, 2011 at 9:53 pm
THis is what I want to accomplish:
Select * from table into some text file.
.....that is I want to get the output of a select statement into some text file.
October 4, 2011 at 7:19 am
If this is a one time thing just run your select in SSMS and select the results to file option. This will let you name the file to whatever. If this is an ongoing process then you should use SSIS.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply