Hi,
I have a problem with a request concerning chineese data on a nText field...
Here is a sample:
TABLE : T
FIELD : TXT as nText
I insert this value on my table : ? [???] ???????????
Now i'd like to query my table to retrieve rows containing an exact match to
my only line
SELECT * FROM T WHERE TXT LIKE '? [[]???] ???????????'
as specified in MSDN documentation i have to replace the caracter [ to [ [ ]
and let the caracter ] as normal
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_la-l
z_115x.asp)
This request doesn't return me any result. i tried a lot of variations to
retrieve my data (space between [, ] and ]; replace ] by []] ...) but
nothing's working
However one thing is working > Convert my TXT field from nText to varchar :
SELECT * FROM T WHERE CONVERT(varchar(8000),TXT) LIKE '? [[]???]
???????????'
The query return the good answer
Another thing > Convert myTXT field from nText to nvarchar :
SELECT * FROM T WHERE CONVERT(nvarchar(4000),TXT) LIKE '? [[]???]
???????????'
This query don't return any result !
If someone have an idea about this problem, i'll be really happy to read him
;-)
Thanks
Guillaume D.
GuillaumeD - 23 Feb 2006 15:14 GMT
NEW SEND WITH UTF-8
--------------------------------------------------------------------------------------------
Hi,
I have a problem with a request concerning chineese data on a nText field...
Here is a sample:
TABLE : T
FIELD : TXT as nText
I insert this value on my table : ? [???] ???????????
Now i'd like to query my table to retrieve rows containing an exact match to
my only line
SELECT * FROM T WHERE TXT LIKE '? [[]???] ???????????'
as specified in MSDN documentation i have to replace the caracter [ to [ [ ]
and let the caracter ] as normal
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_la-l
z_115x.asp)
This request doesn't return me any result. i tried a lot of variations to
retrieve my data (space between [, ] and ]; replace ] by []] ...) but
nothing's working
However one thing is working > Convert my TXT field from nText to varchar :
SELECT * FROM T WHERE CONVERT(varchar(8000),TXT) LIKE '? [[]???]
???????????'
The query return the good answer
Another thing > Convert myTXT field from nText to nvarchar :
SELECT * FROM T WHERE CONVERT(nvarchar(4000),TXT) LIKE '? [[]???]
???????????'
This query don't return any result !
If someone have an idea about this problem, i'll be really happy to read him
;-)
PS: I'm Working on SQL SERVER 2005.
Thanks
Guillaume D.
GuillaumeD - 23 Feb 2006 15:15 GMT
NEW SEND WITH UTF-8
--------------------------------------------------------------------------------------------
Hi,
I have a problem with a request concerning chineese data on a nText field...
Here is a sample:
TABLE : T
FIELD : TXT as nText
I insert this value on my table : ? [???] ???????????
Now i'd like to query my table to retrieve rows containing an exact match to
my only line
SELECT * FROM T WHERE TXT LIKE '? [[]???] ???????????'
as specified in MSDN documentation i have to replace the caracter [ to [ [ ]
and let the caracter ] as normal
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_la-l
z_115x.asp)
This request doesn't return me any result. i tried a lot of variations to
retrieve my data (space between [, ] and ]; replace ] by []] ...) but
nothing's working
However one thing is working > Convert my TXT field from nText to varchar :
SELECT * FROM T WHERE CONVERT(varchar(8000),TXT) LIKE '? [[]???]
???????????'
The query return the good answer
Another thing > Convert myTXT field from nText to nvarchar :
SELECT * FROM T WHERE CONVERT(nvarchar(4000),TXT) LIKE '? [[]???]
???????????'
This query don't return any result !
If someone have an idea about this problem, i'll be really happy to read him
;-)
PS: I'm Working on SQL SERVER 2005.
Thanks
Guillaume D.
GuillaumeD - 23 Feb 2006 15:24 GMT
F... !
appears Outlook Express cannot send chineese string on news !
Guillaume D
If someone have a powerful News client ... i take it
gduprez@gmail.com - 23 Feb 2006 16:31 GMT
Test :
按 [下一步] 刪除修復磁碟分割。 按 [取消]
退出本程式。
ML - 23 Feb 2006 16:56 GMT
Gmail rocks, I guess... ;)
Have you tried my suggestion of qualifying the string in parentheses with N?
ML
---
http://milambda.blogspot.com/
ML - 23 Feb 2006 15:29 GMT
Try this (untested):
SELECT * FROM T WHERE TXT LIKE N'? [[]???] ???????????'
ML
---
http://milambda.blogspot.com/