Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


I would like to insert from the clipboard text with line breaks in a "varchar" column.


I would like to insert from the clipboard text with line breaks in a "varchar" column.

Author
Message
sql 25506
sql 25506
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 6
Hi,

I would like to insert from the clipboard text with line breaks in a "varchar" column.
(eg. copy some lines , open "Enterprise Manager" select column and insert the Text from clipboard with CTRL + V )

If I do, I only have the first line in the column.


Then I thought I take the new "SQL Server Managemant Studio" and do the same (select column and insert the Text from clipboard with CTRL + V )
Hmm .. only the first line there.

I can not believe. Is ther trick to do it?

Thank you in advance for your help!

Please dont tell me: "Use MS-ACCESS to connect to the DB and INSERT it the way I want (CTRL+V)" this is the F....... Way I do it ;-)
Lowell
Lowell
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14942 Visits: 38935
in the object explorer on the left, expand your database till you see the table.
right click on that table , and selecte the "Edit Top 200 rows;
you can always change the SQL to get the whole table, but the grid that is presented is editable, so you can select a cell and paste into it, just like the old Enterpise Manager.


Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
SSCertifiable
SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)

Group: General Forum Members
Points: 5767 Visits: 7128
the only way I know to do this is by using T-SQL,
e.g.


UPDATE TableName
   SET VarcharColumn = 'Some Text with
line breaks in'
WHERE PrimaryKeyColumn = SomeValue



____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
sql 25506
sql 25506
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 6
@Lowell
Yes, and if I do so and there a linebreaks in, i have only the First line ;-)

@stewartc-708166
Then i'll try the Option to connect with MS-ACCES because that works.
But its unbeliveble that i have to do so.
Lowell
Lowell
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14942 Visits: 38935
no, whatever you paste is whatever you paste....

the GRID, by design, cannot show multiple rows...(it's a grid), so for presentation purposes, it replaces CHAR(13) and CHAR(10) as spaces...but the underlying data is still whatever you paste...
after editing, go to a new query, change to text mode(control T), and select the row with the value you pasted...it's got CrLf's in it if you pasted it. change back grid mode(control D) and you see the data with CrLf replaced with spaces.


cheese and rice, it only takes the first line of the pasted text!
sorry i was all wrong! the CrLf behavior i stated is true if the data contains it, but not the pasteing part!

Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search