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

  • 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 😉

  • 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!

  • This was removed by the editor as SPAM

  • @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.

  • 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!

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply