Return-Path: Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 64485 invoked from network); 24 Jul 2000 08:52:09 -0000 Received: from elvis.triestram-partner.de (HELO BLAHFASEL.Triestram-Partner.de) (212.185.173.195) by locus.apache.org with SMTP; 24 Jul 2000 08:52:09 -0000 Received: by BLAHFASEL with Internet Mail Service (5.5.2650.21) id ; Mon, 24 Jul 2000 10:52:05 +0200 Message-ID: <4094ADEA26D8D3119F020000D1106EC4061E08@BLAHFASEL> From: Henning von Bargen To: cocoon-users@xml.apache.org Subject: AW: Wildcard in a SQL-query?? Date: Mon, 24 Jul 2000 10:52:04 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N But if you test with non-valid SQL syntax as in the examples you gave=20 then you cannot expect variables to work. Henning > -----Urspr=FCngliche Nachricht----- > Von: Nicki M=F8ller [SMTP:nicki_moller@yahoo.dk] > Gesendet am: Montag, 24. Juli 2000 10:13 > An: cocoon-users@xml.apache.org; geoffd@attglobal.net > Betreff: Re: Wildcard in a SQL-query?? >=20 > Hi Geoff, >=20 > Thanxs for the suggestion, but the syntax of the > SQL-query I know.=20 > It's more the syntax on how I refere to a variable I'm > looking for. >=20 > -Nicki >=20 >=20 >=20 > --- Geoff Drake skrev: > Hi > Nick the usual syntax is: > >=20 > > select somefields from aTable > > WHERE name like 'SMITH%' > >=20 > > Note the ' around SMITH% > > Also like only works for text/char fields e.g. > > varchar. > >=20 > > Hope this helps > >=20 > > Geoff > >=20 > >=20 > >=20 > >=20 > > Nicki M=F8ller wrote: > >=20 > > > Hi All, > > > > > > Can anyone help me with making a query containing > > a > > > wildcard. (something similar to this) > > > > > > WHERE day% like Starttime > > > > > > I've tried different wayes of dooing this but with > > out > > > luck. > > > > > > Here's to examples on what I've tried > > > > > > -------------- > > > > > > String day =3D request.getParameter ("day"); > > > day.trim(); > > > > > > > > > > > > SELECT Event_Id, Body, Starttime, Endtime > > FROM Events > > > WHERE day% like Starttime > > > ORDER BY Event_Id > > > > > > -------------- > > > > > > -------------- > > > > > > String day =3D request.getParameter ("day"); > > > day =3D day + "%" > > > day.trim(); > > > > > > > > > > > > SELECT Event_Id, Body, Starttime, Endtime > > FROM Events > > > WHERE day like Starttime > > > ORDER BY Event_Id > > > > > > -------------- > > > > > > All help is appreciated > > > > > > -Nicki > > > > > > > > > ______________________________________________________ > > > Do You Yahoo!? > > > F=E5 en gratis @yahoo.dk-adresse p=E5 > > http://mail.yahoo.dk > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > cocoon-users-unsubscribe@xml.apache.org > > > For additional commands, e-mail: > > cocoon-users-help@xml.apache.org > >=20 > >=20 > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > cocoon-users-unsubscribe@xml.apache.org > > For additional commands, e-mail: > > cocoon-users-help@xml.apache.org > >=20 >=20 >=20 > ______________________________________________________ > Do You Yahoo!? > F=E5 en gratis @yahoo.dk-adresse p=E5 http://mail.yahoo.dk >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org > For additional commands, e-mail: cocoon-users-help@xml.apache.org