Problem with AND and OR on a join with Valentina (Director?)

Leto Muaddib letomuaddib at yahoo.com
Thu Mar 11 20:09:15 CST 2004


Hi, list and Ruslan,

I have a big and urgent problem with Valentina 1.10 on
Macromedia Director on Windows.

I am trying to do the following:
Table t has two fields, t.tID and t.Name. It has one
record:
t.tID = 1 and t.Name = 't 4'
Table k has two fields, k.kID and k.Kwd. It has two
records:
k.tID = 1 and k.Kwd = 2
k.tID = 1 and k.KWD = 3

Let's do a simple query:

SELECT * FROM t, k WHERE
t.tID = k.tID
AND t.name = 't 4'

Perfect, it returns a join of the two tables, with
both records from k joined to the one on t.

Now let's do another simple query:

SELECT * FROM t, k WHERE
t.tID = k.tID 
AND t.name = 't 4' OR k.Kwd = 2

Uhm, this is weird, it returns only one record from
the join, the one with k.Kwd = 2.

Another test query:

SELECT * FROM t, k WHERE
t.tID = k.tID 
AND t.name = 't 4' OR k.Kwd = 1

This doesn't return anything. Of course, this is very
bad, since it really looks like the OR is interpreted
as an AND.

This theory is confirmed by:

SELECT * FROM t, k WHERE
t.tID = k.tID 
AND t.name = 't 4' OR (k.Kwd = 2 OR k.Kwd = 3)

Here, it looks like the first OR is interpreted as an
AND and the second one as a real OR.

Needless to say, this is a huge problem in an urgent
project. First of all, can anyone else confirm this? I
did my best to make sure this is a Valentina problem,
and I'm quite confident it is. But if someone else
could confirm, it would be better.

Second, having a quick answer to this would save my
butt, and would be greatly appreciated.

The only thing preventing me for screaming out loud
"THIS IS A BUG" is the fact that the query is very
basic.

Anyway, thanks in advance for any reply.

Goran

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com


More information about the Valentina mailing list