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
--
No comments:
Post a Comment