Thanks Michael for the info.
My doubt here is, can we use N’%’ for varchar/char types? We generalized our
application earlier to generate N prefixed string constants irrespective of
whether the type is nvarchar/nchar or varchar/char. I would like to know if
this generalization is valid or not.
Regards,
Kiran
[quoted text, click to view] "Michael Cheng [MSFT]" wrote:
> Hi Kiran,
>
> Welcome to use MSDN Managed Newsgroup!
>
> 'N' is used to represent Unicode character so when you use N'%' it
> indicates that the potential data types that you are using is either
> nvarchar or nchar (both are used to support unicode character sets) where
> are when we use '%' the data types would be char or varchar.
>
> Thank you for your patience and cooperation. If you have any questions or
> concerns, don't hesitate to let me know. We are always here to be of
> assistance!
>
>
> Sincerely yours,
>
> Michael Cheng
> Microsoft Online Partner Support
>
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
Michael,
I would like to add one more point here. This generalization works fine in
all other cases. We are facing problem only in this particular case. I would
also like to know if Microsoft is aware of this situation/problem.
Regards,
Kiran
[quoted text, click to view] "kiran_yalla" wrote:
> Thanks Michael for the info.
>
> My doubt here is, can we use N’%’ for varchar/char types? We generalized our
> application earlier to generate N prefixed string constants irrespective of
> whether the type is nvarchar/nchar or varchar/char. I would like to know if
> this generalization is valid or not.
>
> Regards,
> Kiran
>
>
> "Michael Cheng [MSFT]" wrote:
>
> > Hi Kiran,
> >
> > Welcome to use MSDN Managed Newsgroup!
> >
> > 'N' is used to represent Unicode character so when you use N'%' it
> > indicates that the potential data types that you are using is either
> > nvarchar or nchar (both are used to support unicode character sets) where
> > are when we use '%' the data types would be char or varchar.
> >
> > Thank you for your patience and cooperation. If you have any questions or
> > concerns, don't hesitate to let me know. We are always here to be of
> > assistance!
> >
> >
> > Sincerely yours,
> >
> > Michael Cheng
> > Microsoft Online Partner Support
> >
> > When responding to posts, please "Reply to Group" via your newsreader so
> > that others may learn and benefit from your issue.
> > =====================================================
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> >
Hi Kiran,
Welcome to use MSDN Managed Newsgroup!
'N' is used to represent Unicode character so when you use N'%' it
indicates that the potential data types that you are using is either
nvarchar or nchar (both are used to support unicode character sets) where
are when we use '%' the data types would be char or varchar.
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Kiran,
Thanks for your update.
- My doubt here is, can we use N'' for varchar/char types?
No, it is not recommanded to do so. But if your database is an English one
and it works for most times, it think it's OK if you leave them what they
used to be.
Yes, I have realized SQL cannot handle the NULL values after convert() but
not sure why. I will let our development guys know about this.
Thanks for your patience and cooperation.
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Don't see what you're looking for? Try a search.