Using LIKE with PostgreSQL
Using LIKE with PostgreSQL
- Subject: Using LIKE with PostgreSQL
- From: Colin Shreffler <email@hidden>
- Date: Tue, 09 Aug 2005 22:51:48 -0600
Title: Using LIKE with PostgreSQL
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:
This email sent to email@hidden