December 5, 2017 at 9:34 am
Lynn Pettis - Tuesday, December 5, 2017 9:17 AMThat would have to be one hell of a long piece of dynamic SQL. I do agree, however, especially if you actually need to include UNICODE characters in the dynamic SQL. Of course there is someone (not me) out there that would disagree with you.
You don't need to include them, but the type is required to use it on sp_executesql.
December 5, 2017 at 9:43 am
Luis Cazares - Tuesday, December 5, 2017 9:34 AMLynn Pettis - Tuesday, December 5, 2017 9:17 AMThat would have to be one hell of a long piece of dynamic SQL. I do agree, however, especially if you actually need to include UNICODE characters in the dynamic SQL. Of course there is someone (not me) out there that would disagree with you.
You don't need to include them, but the type is required to use it on sp_executesql.
I always declare my variables as nvarchar(max) for the sql command and sql parameters variables. I also try to use the N' but sometimes forget that part.
December 5, 2017 at 9:54 am
Lynn Pettis - Tuesday, December 5, 2017 9:43 AMLuis Cazares - Tuesday, December 5, 2017 9:34 AMLynn Pettis - Tuesday, December 5, 2017 9:17 AMThat would have to be one hell of a long piece of dynamic SQL. I do agree, however, especially if you actually need to include UNICODE characters in the dynamic SQL. Of course there is someone (not me) out there that would disagree with you.
You don't need to include them, but the type is required to use it on sp_executesql.
I always declare my variables as nvarchar(max) for the sql command and sql parameters variables. I also try to use the N' but sometimes forget that part.
I forget it as well, that's why I have it on my code review checklist. 😉
Viewing 3 posts - 31 through 33 (of 33 total)
You must be logged in to reply to this topic. Login to reply