How do you get back the full content of rows in SQL Server Management Studio?
If you use "results to grid" the data is encoded, so things like line breaks are lost. If you do "result to file" or "results to text" the text is limited to 8192 characters.
NOTE: I have the solution, but I am using SO to document this. If you have a better answer feel free to post it.
If we just use Ctrl+R we can toggle between showing and hiding the results pane and therefore you can see more of the Editor section when you are using SQL Server Management Studio.
Launch SSMS and connect to the required database. 2. In Object Explorer, go to the database that you want to export to Excel. Invoke the shortcut menu and go to Tasks > Export Data.
To number rows in a result set, you have to use an SQL window function called ROW_NUMBER() . This function assigns a sequential integer number to each result row. However, it can also be used to number records in different ways, such as by subsets.
I cast it to XML
select @variable_with_long_text as [processing-instruction(x)] FOR XML PATH
The processing-instruction
bit is there to stop it entitising characters such as <
to <
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With