Re: Using LIKE with PostgreSQL
Re: Using LIKE with PostgreSQL
- Subject: Re: Using LIKE with PostgreSQL
- From: Anjo Krank <email@hidden>
- Date: Wed, 10 Aug 2005 18:47:57 +0200
Nope.
The reason it's not working is that PostgresSQL needs a plugin to
change the escape code from \ to something else.
Bla, bla Project Wonder, bla.
Cheers, Anjo
Am 10.08.2005 um 16:05 schrieb Jerry W. Walker:
Hi, Colin,
I think the way you modified your code to add the '*' to the
$lastName value is getting tangled up in escape levels. The JDBC
adaptor is complaining about an "... unterminated quoted string at
or near "'\'", which suggests that you are escaping something one
too many or one too few times.
Regards,
Jerry
On Aug 10, 2005, at 12:51 AM, Colin Shreffler wrote:
I am trying to create a simple LIKE query in EOModeler to run
against PostgreSQL. In EOModeler I have added a single qualifier:
(lastName LIKE $lastName).
I have also modified my code to insert an ā*ā after the value
before it is passed to EOF.
I keep getting the error below. Can anyone tell me what Iām doing
wrong?
Error: com.webobjects.jdbcadaptor.JDBCAdaptorException:
EvaluateExpression failed: : Next exception:SQL State:42601 --
error code: 0 -- msg: ERROR: unterminated quoted string at or near
"'\' ORDER BY t0.last_name ASC"
Reason: EvaluateExpression failed:
<com.webobjects.jdbcadaptor.JDBCExpression: "SELECT
t0.customer_contact_id, t0.customer_fid, RTRIM(t0.email), RTRIM
(t0.fax), RTRIM(t0.first_name), RTRIM(t0.home_phone), RTRIM
(t0.last_name), RTRIM(t0.mobile_phone), t0.salutation_fid, RTRIM
(t0.work_phone) FROM customer_contact t0 WHERE UPPER(t0.last_name)
LIKE UPPER(?) ESCAPE '\' ORDER BY t0.last_name ASC" withBindings:
1:"Shr%"(lastName)>: Next exception:SQL State:42601 -- error code:
0 -- msg: ERROR: unterminated quoted string at or near "'\' ORDER
BY t0.last_name ASC"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40codefab.com
This email sent to email@hidden
--
__ Jerry W. Walker, Partner
C o d e F a b, LLC - "High Performance Industrial Strength
Internet Enabled Systems"
email@hidden
212 465 8484 X-102 office
212 465 9178 fax
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40logicunited.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden