Hi @rajesh yadav ,
Welcome to Microsoft Q&A!
I would like to know can i set some thing at the top of stored procedure or in connectionstring , so that i do not have to bother while making SP or after wards.
Actually there is no such setting. You have to cut the query in two blocks as you already did.
Besides, you could use nvarchar(max), instead of varchar(4000) or varchar(max). This could store up to 2 GB of text. Please refer more details in this forum.
And use sp_executesql if necessary.
Best regards,
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.