Return-Path: X-Original-To: apmail-db-torque-dev-archive@www.apache.org Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C4BC3D505 for ; Mon, 24 Sep 2012 07:08:28 +0000 (UTC) Received: (qmail 74182 invoked by uid 500); 24 Sep 2012 07:08:28 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 74131 invoked by uid 500); 24 Sep 2012 07:08:28 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 74039 invoked by uid 99); 24 Sep 2012 07:08:28 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Sep 2012 07:08:28 +0000 Date: Mon, 24 Sep 2012 18:08:28 +1100 (NCT) From: "Thomas Fox (JIRA)" To: torque-dev@db.apache.org Message-ID: <479516253.115572.1348470508422.JavaMail.jiratomcat@arcas> Subject: [jira] [Closed] (TORQUE-96) Can not use * or ? in LIKE clauses MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/TORQUE-96?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Fox closed TORQUE-96. ---------------------------- > Can not use * or ? in LIKE clauses > ---------------------------------- > > Key: TORQUE-96 > URL: https://issues.apache.org/jira/browse/TORQUE-96 > Project: Torque > Issue Type: Bug > Components: Runtime > Affects Versions: 3.3-RC3, 3.3 > Reporter: CG Monroe > Priority: Minor > Fix For: 4.0-beta1 > > > If you have a ? or * in a like criteria, they get replaced with "_" and "%" in the SqlExpression class. However, this causes problems if you want to search for these characters. > If you try to escape them with a \, the SQL generated is invalid for some DB's (Like MS SQL). This causes an SQLException to be thrown with text like: > Invalid escape sequence. Valid characters after ESC are: an ESC pair, underscore, percent sign > My memory is that % and _ are the SQL standard wild card/match characters. So, is the bug here that since ? and * are non-standard > they should not be processed? > If for some reason they need to be processed, do we go down the road of having a Torque escape character so that these characters can be searched? > But this leads to possibly requiring stuff like "\\\\" in criterias to get an escaped \\ to the SQL parser so that single \ can be passed. This can be very confusing and would need to be documented correctly somewhere. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org