Help for SQL query

info at vallemediatime.com info at vallemediatime.com
Wed Jun 15 09:42:12 CDT 2005


with:
WHERE fld IN (v1, v1) -- same fields
the query works, it's probably that this sql sintax need two or more value,
right?
Paolo


----- Original Message -----
From: <info at vallemediatime.com>
To: "Valentina Developers" <valentina at lists.macserve.net>
Sent: Wednesday, June 15, 2005 9:34 AM
Subject: Re: Help for SQL query


>
> ----- Original Message -----
> From: "Ruslan Zasukhin" <sunshine at public.kherson.ua>
> To: <valentina at lists.macserve.net>
> Sent: Wednesday, June 15, 2005 9:06 AM
> Subject: Re: Help for SQL query
>
>
> > On 6/15/05 9:46 AM, "info at vallemediatime.com" <info at vallemediatime.com>
> > wrote:
> >
> > > Hi list,
> > > I need to optimize this query...
> > >
> > > on searchStringBySQL
> > > searchString = member("searchString").text
> > > gCursor = 0
> > > query = "SELECT RecID, * from STUDENTI\
> > > WHERE sF1 = '" & searchString & "'\
> > > OR sF2 = '" & searchString & "'\
> > > OR sF3 = '" & searchString & "'\
> > > -- and so on...
> > > OR sF30 = '" & searchString & "'"
> > >
> > > gCursor = gDb.sqlSelect(query, #kServer, #kReadWrite, #kRandom)
> > > if CheckValError() then exit
> > > updateResultGrid()
> > > end
> > >
> > > ... but I don't know if is possible to insert a repeat loop into
query,
> or
> > > to use some other solution
> > > somebody have a suggestion?
> >
> > Hi Paolo,
> >
> > You can use
> >
> >     WHERE fld IN (v1, v2, v3)
>
> good, this works
> but if I use:
> WHERE fld IN (v1)  -- only one value
> I get a Verror... is normal?
> Paolo
>
>
>
>
> >
> > --
> > Best regards,
> >
> > Ruslan Zasukhin
> > VP Engineering and New Technology
> > Paradigma Software, Inc
> >
> > Valentina - Joining Worlds of Information
> > http://www.paradigmasoft.com
> >
> > [I feel the need: the need for speed]
> >
> >
> > _______________________________________________
> > Valentina mailing list
> > Valentina at lists.macserve.net
> > http://lists.macserve.net/mailman/listinfo/valentina
> >
> >
> >
> > --
> > Internal Virus Database is out-of-date.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.323 / Virus Database: 267.6.2 - Release Date: 04/06/2005
> >
> >
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>
>
>
> --
> Internal Virus Database is out-of-date.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.6.2 - Release Date: 04/06/2005
>
>



More information about the Valentina mailing list