I have a table with a text data type field, when I paste text less than 1024 in lenght, all is right, but when the size is greater than 1024 nothing is pasted. Some help?
"Paste" where? Have you considered using an INSERT or UPDATE statement in
Query Analyzer?
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Andres Romero" <anonymous@.discussions.microsoft.com> wrote in message
news:BAE4075B-4228-40B3-8ED2-FB23DBF732F1@.microsoft.com...
> I have a table with a text data type field, when I paste text less than
1024 in lenght, all is right, but when the size is greater than 1024 nothing
is pasted. Some help?
|||Hi,
Execute the command Select @.@.textsize to identify the current value.
Increase the value of store using
SET TEXTSIZE <Value in bytes>
Increase to a higher value and try inserting.
Thanks
Hari
MCDBA
"Andres Romero" <anonymous@.discussions.microsoft.com> wrote in message
news:BAE4075B-4228-40B3-8ED2-FB23DBF732F1@.microsoft.com...
> I have a table with a text data type field, when I paste text less than
1024 in lenght, all is right, but when the size is greater than 1024 nothing
is pasted. Some help?
Showing posts with label lenght. Show all posts
Showing posts with label lenght. Show all posts
Friday, March 9, 2012
Error with text data type
I have a table with a text data type field, when I paste text less than 1024 in lenght, all is right, but when the size is greater than 1024 nothing is pasted. Some help?"Paste" where? Have you considered using an INSERT or UPDATE statement in
Query Analyzer?
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Andres Romero" <anonymous@.discussions.microsoft.com> wrote in message
news:BAE4075B-4228-40B3-8ED2-FB23DBF732F1@.microsoft.com...
> I have a table with a text data type field, when I paste text less than
1024 in lenght, all is right, but when the size is greater than 1024 nothing
is pasted. Some help?|||Hi,
Execute the command Select @.@.textsize to identify the current value.
Increase the value of store using
SET TEXTSIZE <Value in bytes>
Increase to a higher value and try inserting.
Thanks
Hari
MCDBA
"Andres Romero" <anonymous@.discussions.microsoft.com> wrote in message
news:BAE4075B-4228-40B3-8ED2-FB23DBF732F1@.microsoft.com...
> I have a table with a text data type field, when I paste text less than
1024 in lenght, all is right, but when the size is greater than 1024 nothing
is pasted. Some help?
Query Analyzer?
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Andres Romero" <anonymous@.discussions.microsoft.com> wrote in message
news:BAE4075B-4228-40B3-8ED2-FB23DBF732F1@.microsoft.com...
> I have a table with a text data type field, when I paste text less than
1024 in lenght, all is right, but when the size is greater than 1024 nothing
is pasted. Some help?|||Hi,
Execute the command Select @.@.textsize to identify the current value.
Increase the value of store using
SET TEXTSIZE <Value in bytes>
Increase to a higher value and try inserting.
Thanks
Hari
MCDBA
"Andres Romero" <anonymous@.discussions.microsoft.com> wrote in message
news:BAE4075B-4228-40B3-8ED2-FB23DBF732F1@.microsoft.com...
> I have a table with a text data type field, when I paste text less than
1024 in lenght, all is right, but when the size is greater than 1024 nothing
is pasted. Some help?
Error with text data type
I have a table with a text data type field, when I paste text less than 1024
in lenght, all is right, but when the size is greater than 1024 nothing is
pasted. Some help?"Paste" where? Have you considered using an INSERT or UPDATE statement in
Query Analyzer?
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Andres Romero" <anonymous@.discussions.microsoft.com> wrote in message
news:BAE4075B-4228-40B3-8ED2-FB23DBF732F1@.microsoft.com...
> I have a table with a text data type field, when I paste text less than
1024 in lenght, all is right, but when the size is greater than 1024 nothing
is pasted. Some help?|||Hi,
Execute the command Select @.@.textsize to identify the current value.
Increase the value of store using
SET TEXTSIZE <Value in bytes>
Increase to a higher value and try inserting.
Thanks
Hari
MCDBA
"Andres Romero" <anonymous@.discussions.microsoft.com> wrote in message
news:BAE4075B-4228-40B3-8ED2-FB23DBF732F1@.microsoft.com...
> I have a table with a text data type field, when I paste text less than
1024 in lenght, all is right, but when the size is greater than 1024 nothing
is pasted. Some help?
in lenght, all is right, but when the size is greater than 1024 nothing is
pasted. Some help?"Paste" where? Have you considered using an INSERT or UPDATE statement in
Query Analyzer?
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Andres Romero" <anonymous@.discussions.microsoft.com> wrote in message
news:BAE4075B-4228-40B3-8ED2-FB23DBF732F1@.microsoft.com...
> I have a table with a text data type field, when I paste text less than
1024 in lenght, all is right, but when the size is greater than 1024 nothing
is pasted. Some help?|||Hi,
Execute the command Select @.@.textsize to identify the current value.
Increase the value of store using
SET TEXTSIZE <Value in bytes>
Increase to a higher value and try inserting.
Thanks
Hari
MCDBA
"Andres Romero" <anonymous@.discussions.microsoft.com> wrote in message
news:BAE4075B-4228-40B3-8ED2-FB23DBF732F1@.microsoft.com...
> I have a table with a text data type field, when I paste text less than
1024 in lenght, all is right, but when the size is greater than 1024 nothing
is pasted. Some help?
Friday, February 17, 2012
error while inserting data in to sql thru procedure
Dear all,
I am using the procedure for inserting data in to my tables.
when i try to inserting large lenght data the follwing error is comming
"Server: Msg 103, Level 15, State 7, Line 1
The identifier that starts with '7,'ppppppdd','asdf','asdf',1,
1,1,'asdf','
f','asd','asdf','asdf','a
sd','NA','asdasdf','asd','asasdf','a
sdf','asdf','asdfa','a' is too long. Maximum length is 128."
how can i input the data more thatn128
please help me I am new in sql
@.tblName varchar(100), @.sqlstring varCHAR(5000)
AS
declare @.insertqry varchar(5000)
set @.insertqry='insert into '+ @.tblname + ' values (' + @.sqlstring +
',GETDATE())'
EXEC(@.insertqry)
Regards
lalWhy are you using dynamic SQL to insert data from an SP? I strongly
recommend you use a separate SP for each table and just pass the column
data as parameters. Use a static INSERT statement and use default
values if you need to support optional data.
Without seeing the full code or anything that reproduces the problem it
looks like you must have either a mismatched number of quotes or a
double-quoted string in your @.sqlstring with the QUOTED_IDENTIFIER
option set ON. Print out the @.sqlstring value, then paste it into Query
Analyzer to find the problem.
David Portas
SQL Server MVP
--
I am using the procedure for inserting data in to my tables.
when i try to inserting large lenght data the follwing error is comming
"Server: Msg 103, Level 15, State 7, Line 1
The identifier that starts with '7,'ppppppdd','asdf','asdf',1,
1,1,'asdf','
sd','NA','asdasdf','asd','asasdf','a
sdf','asdf','asdfa','a' is too long. Maximum length is 128."
how can i input the data more thatn128
please help me I am new in sql
@.tblName varchar(100), @.sqlstring varCHAR(5000)
AS
declare @.insertqry varchar(5000)
set @.insertqry='insert into '+ @.tblname + ' values (' + @.sqlstring +
',GETDATE())'
EXEC(@.insertqry)
Regards
lalWhy are you using dynamic SQL to insert data from an SP? I strongly
recommend you use a separate SP for each table and just pass the column
data as parameters. Use a static INSERT statement and use default
values if you need to support optional data.
Without seeing the full code or anything that reproduces the problem it
looks like you must have either a mismatched number of quotes or a
double-quoted string in your @.sqlstring with the QUOTED_IDENTIFIER
option set ON. Print out the @.sqlstring value, then paste it into Query
Analyzer to find the problem.
David Portas
SQL Server MVP
--
Subscribe to:
Posts (Atom)