Why doesn't this query work?

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Mar 16 17:18:04 CST 2004


On 3/16/04 4:18 PM, "Peter De Berdt" <peter.de.berdt at pandora.be> wrote:

> Hi Ruslan,
> 
> SELECT Modules.MODULE,ModuleEntries.DESCRIPTION,RecID FROM
> ModuleEntries,Modules WHERE (Modules.MODULE LIKE 'multi-' no_case) OR
> (Modules.TEXT LIKE 'multi-' no_case) OR (ModuleEntries.DESCRIPTION
> LIKE 'multi-' no_case) OR (ModuleEntries.TEXT LIKE 'multi-' no_case)
> 
> It should bring up 50 records, but an empty cursor is returned.
> Searching for the word "Agenda" should bring up 40 records, but only returns
> 6.
> 
> Doesn't the OR or LIKE statement work across related tables?

Hi Peter,

OR not works on fields from related tables.

Guys, please keep in mind such type of query is not such fast
as join on AND.

So may be consider changing of your db structure.
Use OR on related fields very rare.


Peter, you can get the same functionality using

    SELECT 
    FRON T1
    WHERE T1.id in (SELET t1_ptr FROM T2 WHERE ... )
            AND ...


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list