Hello,
we are using UniDAC with Interbase 2009, Oracle 8.0.5 and MS SQL-Server 2008 RC2. Delphi 7 and UniDAC 3.50.0.13.
I have a Table "ARTIKEL", with the string-fields "ARTIKELID", "SUCHBEGRIFF" and some more.
The Query
select artikelid, suchbegriff
from artikel
where suchbegriff >= 'LEXM'
and suchbegriff <= 'LEXN'
works fine with Interbase and Oracle. But with Sql-Server i got the result:
16568 LEXMARK
15185 LEXMARK 2390 PLUS
15186 LEXMARK 2390 PLUS
16018 LEX-MARK 2391 PLUS
27306 LEXMARK C500N 64MB 31PPM A4 COLOR USB
Why is "LEX-MARK 2391 PLUS" in the result of this Query???? And how can I avoid this?
Thanks in advance for this answer.
Kind regards,
Gerd Brinkmann
invent GmbH
Sql-Server: How to elimate "-"?
Hello,
This is a specificity of SQL Server work and not UniDAC. You can check it using Microsoft SQL Server Management Studio. You can use one of the following solutions:
This is a specificity of SQL Server work and not UniDAC. You can check it using Microsoft SQL Server Management Studio. You can use one of the following solutions:
Code: Select all
select artikelid, suchbegriff
from artikel
where cast(suchbegriff as varbinary) >= cast('LEXM' as varbinary)
and cast(suchbegriff as varbinary) = 'LEXM' collate Latin1_General_BIN
and suchbegriff <= 'LEXN' collate Latin1_General_BIN