[V4MD] OR query results
Ruslan Zasukhin
sunshine at public.kherson.ua
Sat Dec 20 17:24:21 CST 2003
on 12/20/03 12:24 PM, Martin Kloss at martin.kloss at gmx.de wrote:
>>>>> SELECT title, type_name FROM a, b WHERE (type_name = 'red' AND
>> type_name =
>>>>> 'blue') AND (title LIKE '(?i)foo' OR title LIKE '(?i)bar') AND (title NOT
>>>>> LIKE '(?i)test')
>>>>>
>>>
>>> table a: title, type_ptr (->table b->type_name)
>>> table b: type_name
>>
>> Then above query should works, I think.
>
> Nope, it does not. I'm using the value of the type_ptr in the same table
> now, that works:
>
> SELECT title, type_name FROM a, b WHERE (type_ptr = '1' OR type_ptr = '2')
> AND (title LIKE '(?i)foo' OR title LIKE '(?i)bar') AND (title NOT
> LIKE '(?i)test')
>
> So I think comparing fields in different tables in a condition when you're
> doing a join does not work in any case (AND / OR). Is that a limitation that
> will also be in 2.0?
Martin,
AND works 100%
WHERE a.id = b.ptr
AND a.f1 = 5
AND a.f5 > 8
This works. We use all each day.
Send me please small db and query your try to do.
I will check.
--
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