Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Bug using TRIM and LIKE with COLLATE UNI?
Mon, Sep 30 2013 3:37 AMPermanent Link

Hedley Muscroft

Hi,

Here's my SQL :-

select id, lastname, firstname, title from per
where trim(both ' ' from firstname) COLLATE UNI_CI like 'Vincent'

This returns :-
ElevateDB Error #700 An error was found in the statement at line 2 and column 37 (Expected end of expression but instead found COLLATE)

If I remove the TRIM or the COLLATE then it works fine, however I really need both.

Is this a bug or am I doing something wrong?

Thanks,

Hedley Muscroft
Pioneer Software
Mon, Sep 30 2013 3:59 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Hedley


Try

select id, lastname, firstname, title from per
where trim(both ' ' from firstname COLLATE UNI_CI) like 'Vincent'

Roy Lambert [Team Elevate]
Mon, Sep 30 2013 5:35 AMPermanent Link

Hedley Muscroft

Excellent - that works thanks.
Image