[Zope] Simple SQL (?)
Jenny Campbell
jjc@eec.co.nz
Wed, 05 Apr 2000 12:32:53 +1200
Thanks - it's working fine now!!
Jenny
Tino Wildenhain wrote:
> Hi Jenny,
>
> Jenny Campbell wrote:
> >
> > Hi there
> >
> > I know there's probably a really simple answer to this but I can't see it for looking. I've made an ODBC connection to a Access 97 database and am
> > trying to run the following query:
> >
> > select ph_user, ph_location, ph_directno, ph_extension, ph_mobile_ext
> > from tblPhone
> > where ph_user matches '*John*'
> > order by 1
> >
> > but get the following error:
> >
> > Error, sql.error: ('37000', -3100, "[Microsoft][ODBC Microsoft Access 97 Driver] Syntax error (missing operator) in query expression 'ph_user matches
> > '*John*''.")
> >
> > Ideally, I would like to be able to search against a table for ph_user using their first name only and return all the other fields. Would appreciate
> > any advice. We're using Zope 1.10.3
>
> I'm not familar with Access, but most databases use something like:
>
> like '%John%'
> or ideally: like @lower('%john%') to catch all posibilities
> Please refer to your Access manual for this.
>
> If you would like to distinguish first name, second name, you could make
> seperate fields for the names.
>
> HTH
> Tino Wildenhain
--
Jenny Campbell
User Support - Applications
Eastern Equities Limited
Ph: 06-876 7943 Fax: 06-876 8811
---------------------------------