Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

MSSQL Server does not like ILIKE

 Post Reply Post Reply
Author
Maierhofer Bernd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 Oct 2015
Posts: 108
Post Options Post Options   Quote Maierhofer Bernd Quote  Post ReplyReply Direct Link To This Post Topic: MSSQL Server does not like ILIKE
    Posted: 15 Oct 2019 at 8:28pm
Using Linq.ilike when the target is an MSSQL Server results in an error, because ILIKE is not known to the MSSQL Server.
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2485
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 16 Oct 2019 at 1:08pm
Indeed, in this case ILIKE will not work in MSSQL Server. One alternative you can use is simply use Lower to compare: 
Linq['a'].Lower.Like('%inlower')
Back to Top
Maierhofer Bernd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 Oct 2015
Posts: 108
Post Options Post Options   Quote Maierhofer Bernd Quote  Post ReplyReply Direct Link To This Post Posted: 16 Oct 2019 at 7:01pm
Of course, but using Aurelius means, that I must neither know nor take into account, what the underlying DBS knows or does not know, should I?
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2485
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 18 Oct 2019 at 1:00pm
Bernd, that is correct. We even took the effort to add compatibility in minor details, like even the division operation.
But that's not the case here, unfortunately, as that is very different in each database. SQL Server uses collations to define if a query should be case sensitive or not, there is no ILIKE function. There are always minor exceptions, sorry...
Back to Top
Maierhofer Bernd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 Oct 2015
Posts: 108
Post Options Post Options   Quote Maierhofer Bernd Quote  Post ReplyReply Direct Link To This Post Posted: 18 Oct 2019 at 1:12pm
Why not implement ILIKE als Uppercase() like uppercase() for MSSQL?
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2485
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 18 Oct 2019 at 2:45pm
That's something that might be possible. We will have to investigate. I can suggest you register a feature request for that.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down