Bharat Guru
asked on
How to generate insert script from sql server with line breaks in data
I have data with line feeds as below how can I generate the insert scripts with line break
Mytable
----------
Field1 Desc
1 This is a tes1a<CR>
This is a tes1b<CR>
This is a tes1
2 This is a tes2a<CR>
This is a tes2b
3 This is a tes3a<CR>
This is a tes3b<CR>
This is a tes3c
Mytable
----------
Field1 Desc
1 This is a tes1a<CR>
This is a tes1b<CR>
This is a tes1
2 This is a tes2a<CR>
This is a tes2b
3 This is a tes3a<CR>
This is a tes3b<CR>
This is a tes3c
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Bharat, do you still need help with this question?
ASKER
Thanks
Line Feed = CHAR(10)
Typically the LF char is more critical, but if you just want a CR you can do this:
'This is a tes1a' + CHAR(13) + 'This is a tes1b' + CHAR(13) + 'This is a tes1'