N prefex in a non-unicode database
- From: "kiran_yalla" <kiranyalla_pi151@xxxxxxxxxxxxxxxx>
- Date: Fri, 15 Jul 2005 07:09:03 -0700
This problem is about N prefex in a non-unicode database.
Collation name of the database is "SQL_Latin1_General_CP1_CL_AS".
Though the database is a non-unicode database, our application generates
N prefexed (before the string constants) queries. This is because, our
assumption is that non-unicode databse in sql2000 works fine with regular
string constants and N prefixed string constants.
The query is as follows.
SELECT iG_Category_Ita FROM Company WHERE iG_Category_Ita NOT LIKE N'%'
Here iG_Category_Ita is of type varchar(50) and it can take NULL values.
The problem here is, the out put we are getting when the string is not N
prefexed
is diff from the query with N prefexed.
In other words,
1. Output of SELECT iG_Category_Ita FROM Company WHERE iG_Category_Ita
NOT LIKE N'%'
is diff from
2. Output of SELECT iG_Category_Ita FROM Company WHERE iG_Category_Ita
NOT LIKE '%'
second query is returning table rows whose iG_Category_Ita = NULL but first
query is not returning NULL rows.
Can someone please help me if our assumption is correct or not?
Thanks & Regards,
Kiran
.
- Follow-Ups:
- RE: N prefex in a non-unicode database
- From: Michael Cheng [MSFT]
- RE: N prefex in a non-unicode database
- Prev by Date: Re: sql server 2000
- Next by Date: Re: Comparing a pair
- Previous by thread: sql server 2000
- Next by thread: RE: N prefex in a non-unicode database
- Index(es):