Hello all, I have a problem in inserting a text string of about 2000 characters. I supposed that I will make a column , nvarchar(4000) and in there I would insert the string . If I try to copy-paste the string (via the sql enterprise manager), it doesn't let do it, and if I try to write chars into the field , at about 1020 char, it stops writing.. Why is this happening ?? Can anyone help me about text input into tables??
Can you please post the code... MohammedU. Moderator SQL-Server-Performance.com All postings are provided “AS IS†with no warranties for accuracy.
Dont use enterprise manager to edit data, its bad in virtually every way possible <img src='/community/emoticons/emotion-1.gif' alt='' /><br /><br />Use query analyser to do the insert, and if that fails then post the full query and error message
This is the insert query I run from query analyzer. But insert only 256 chars... and the Table1 has a Column1 which is nvarchar(4000).... insert into Table1 (Column1) values ('I have a problem in inserting a text string of about 2000 characters.I supposed that I will make a column , nvarchar(4000) and in there I would insert the string .If I try to copy-paste the string (via the sql enterprise manager), it doesnt let do it, and if I try to write chars into the field , at about 1020 char, it stops writing..I have a problem in inserting a text string of about 2000 characters.I supposed that I will make a column , nvarchar(4000) and in there I would insert the string .If I try to copy-paste the string (via the sql enterprise manager), it doesnt let do it, and if I try to write chars into the field , at about 1020 char, it stops writing..I have a problem in inserting a text string of about 2000 characters.I supposed that I will make a column , nvarchar(4000) and in there I would insert the string .If I try to copy-paste the string (via the sql enterprise manager), it doesnt let do it, and if I try to write chars into the field , at about 1020 char, it stops writing..I have a problem in inserting a text string of about 2000 characters.I supposed that I will make a column , nvarchar(4000) and in there I would insert the string .If I try to copy-paste the string (via the sql enterprise manager), it doesnt let do it, and if I try to write chars into the field , at about 1020 char, it stops writing..I have a problem in inserting a text string of about 2000 characters.I supposed that I will make a column , nvarchar(4000) and in there I would insert the string .If I try to copy-paste the string (via the sql enterprise manager), it doesnt let do it, and if I try to write chars into the field , at about 1020 char, it stops writing..I have a problem in inserting a text string of about 2000 characters.I supposed that I will make a column , nvarchar(4000) and in there I would ')
Sorry, I have made a mistake.. I am so silly... When I copy the results from query analyzer (copy/paste) it copies 256 chars... But in the table (as I see it from enterprise manager) I see that all the 2682 chars have been inserted...
256 is by default to the buffer length on QA, so as suggested use WRITETEXT to update or insert TEXT based columns in a table. Satya SKJ Microsoft SQL Server MVP Writer, Contributing Editor & Moderator http://www.SQL-Server-Performance.Com This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.
Well, I used:<br /><br /><b>Insert into table (column) values ('<Here the text with about 3500 chars>')</b><br /><br />and it worked fine. <br /><br />What I meant about the 256 chars, is that if you do:<br /><b>Select column from table </b><br /><br />the QA will return the column data.OK. If you copy (from the result pane) the data , and paste it into notepad(for example) you will only get 256 chars...<br /><br />I hope the above make some sense to you... <img src='/community/emoticons/emotion-1.gif' alt='' />
Not sure about that <img src='/community/emoticons/emotion-1.gif' alt='' /><br /><br />QA has a limit on the amount of text it will display for any given column, which defaults to 256 I think. <br />You can go into Query Analyser -> Tools -> Options -> results and make this longer if you want, then all results will use the new setting<br /><br />