|
We have two lists to compare, so I need to compare the data in the column against the data in the other column, and I'd like to use LIKE to do it. I used the syntax of "where col1 like col2 + '%' and it doesn't bomb, but it doesn't return any rows, either, and it should.
(comments are locked)
|
|
Personally I have always found LEFT(col, length) to be quicker than LIKE 'value%' - but others swear blind that the exact opposite is true. If you just want the value you're searching for to be at the start, it's worth trying, because the performance of both methods can be variable...
(comments are locked)
|
Late reply but i guess it might hel someone later.
(comments are locked)
|
|
I'd definitely be interested in the datatypes. Have you tried moving the location of DM.KeyIndicator = 'O' to the WHERE clause? Sometimes that positioning does make a difference.
(comments are locked)
|
|
Here is the situation.. Example: If i query for 'aboz', it would return row 1 (from above table) as result and if i query for 'fried', it would return row 2 (from above table) as result. It's the opposite with common situation. Is this the similar problem with yours? I've been looking for solution from weeks ago..
(comments are locked)
|
|
We have a similar problem here. The main difference is that we're using MS-Dynamics. This forces the character fields to be CHAR and not VARCHAR, or NVARCHAR (Dynamics does not support Unicode). Because of this we need to do LTRIM or RTRIM on the fields when we're using one like another.
(comments are locked)
|
« previous 1 2

