Help for SQL query

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Jun 15 10:06:10 CDT 2005


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)

-- 
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]




More information about the Valentina mailing list