LIKE and ESCAPING in JDBC Select Statement
LIKE and ESCAPING in JDBC Select Statement
От:
Andrew Lindesay <apl@lindesay.co.nz>
Дата:
Hello;
I am trying to use the JDBC LIKE escape clause with PG 8.4 and the PG 8.4 JDBC driver.
So far I have tried;
SELECT ... WHERE ... AND (t0.MESSAGE ILIKE ? {escape '|'}) LIMIT 50
SELECT ... WHERE ... AND (t0.MESSAGE ILIKE ?) {escape '|'} LIMIT 50
SELECT ... WHERE ... AND (t0.MESSAGE ILIKE ?) LIMIT 50 {escape '|'}
It seems that there is a problem with all of them. If anybody has used this before and could give me some guidance, that would be great.
Regards;
___
Andrew Lindesay
www.lindesay.co.nz
Re: LIKE and ESCAPING in JDBC Select Statement
On Sat, 30 Jan 2010, Andrew Lindesay wrote:
> I am trying to use the JDBC LIKE escape clause with PG 8.4 and the PG
> 8.4 JDBC driver.
>
> So far I have tried;
>
> SELECT ... WHERE ... AND (t0.MESSAGE ILIKE ? {escape '|'}) LIMIT 50
This works for me as attached. Please be more clear what your problem is.
Kris Jurka
Re: LIKE and ESCAPING in JDBC Select Statement
От:
Andrew Lindesay <apl@lindesay.co.nz>
Дата:
Hi Kris;
I am very sure that was my first attempt and it didn't work yesterday, but I have now done exactly this and the statement has parsed. Thanks for looking at it for me.
cheers.
>> I am trying to use the JDBC LIKE escape clause with PG 8.4 and the PG 8.4 JDBC driver.
>> So far I have tried;
>> SELECT ... WHERE ... AND (t0.MESSAGE ILIKE ? {escape '|'}) LIMIT 50
> This works for me as attached. Please be more clear what your problem is.
___
Andrew Lindesay
www.lindesay.co.nz