Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 how to tackle the problem when string which is to executed dynamically exceeds nvarchar

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-13 : 01:48:15
shallu writes "Hi,
I am creating a stored procedure where i need to build a query dynamically which is to be executed using sp_executesql
but limitation is that we can have nvarchar or ntext datatype to store the query string.
i am storing the string in a variable of type nvarchar(4000)
problem is that the string exceeds the total capacity of nvarchar.
if i use ntext it says can't define local variables of type ntext.
if u could please help me out in this situation


Thanks & Regards"

Nazim
A custom title

1408 Posts

Posted - 2002-05-13 : 02:14:12
you can use multiple nvarchar variables and concetanate them to execute the statement

exec sp_executesql @nvar1+@nvar2+@nvar3...

--------------------------------------------------------------
Go to Top of Page
   

- Advertisement -