Uri Dimant
3/26/2007 9:50:00 AM
Sorry, it should I have just done testing.....
"Uri Dimant" <urid@iscar.co.il> wrote in message
news:%23BK7ct4bHHA.588@TK2MSFTNGP06.phx.gbl...
> Orgil
> I have just did testing and it returns id=2
>
> CREATE TABLE Table2 (
> [id] int IDENTITY (1, 1) PRIMARY KEY CLUSTERED,
> [value] ntext COLLATE SQL_Latin1_General_CP1_CI_AS NULL
> )
> INSERT INTO Table2 (value) SELECT N'???????????????????'
> INSERT INTO Table2 (value) SELECT N'???????????????????'
>
>
> SELECT t1.[id]
> FROM Table2 t1,
> ( SELECT value FROM Table2 where [id] = 1
> ) t2
> WHERE t1.[id] = 2 AND t1.value LIKE t2.value
>
>
>
>
>
>
> "Orgil" <orgilhp@yahoo.com> wrote in message
> news:1174901878.155358.25610@b75g2000hsg.googlegroups.com...
>> /* This is only for example, but my database has to have many values
>> and queries like this. */
>>
>> I have a table named "table2". Its create statement is below:
>> CREATE TABLE Table2 (
>> [id] int IDENTITY (1, 1) PRIMARY KEY CLUSTERED,
>> [value] ntext COLLATE SQL_Latin1_General_CP1_CI_AS NULL
>> )
>>
>> I execute two insert statements below:
>> INSERT Table2 SELECT GemtelSev FROM B_Dursgal WHERE UNBMS_ID =
>> @id
>> INSERT Table2 SELECT GemtelSev FROM B_Dursgal WHERE UNBMS_ID =
>> @id
>>
>> The value under GemtelSev column of B_Dursgal has 4888 unicode
>> characters. Now Table2 has two rows and [value] column has same values
>> for each row.
>> Now I using LIKE operator to check these values of [value] column are
>> really same to each other:
>>
>> SELECT t1.[id]
>> FROM Table2 t1,
>> ( SELECT value FROM Table2 where [id] = 1
>> ) t2
>> WHERE t1.[id] = 2 AND t1.value LIKE t2.value
>>
>> ---------------------------------------------
>> the result set has no row. Therefore I guess that LIKE operator
>> doesn't work on values that have more characters than 3000 or 4000.
>> IS MY GUESS TRUE?
>>
>> Really appreciate any help and advice offered. Thank you.
>> Regards
>> Orgil.
>>
>
>