[SQL] No Not join
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon Sep 15 08:24:49 CDT 2003
on 9/15/03 5:35, David Hood at david.hood at stonebow.otago.ac.nz wrote:
Hi David,
> On the current VAPP the SQL statement
>
> "SELECT table1.*, table2.* FROM table1, table2 WHERE
> ((Table1.ID=Table2.ID2) and (Table1.Code=Table2.Code2)) and
> (Table1.Year=1900) and (Table2.Year2=1910)"
>
> Runs fine giving expected results
>
>
> "SELECT table1.*, table2.* FROM table1, table2 WHERE
> ((table1.ID=Table2.ID2) and (Table1.Code!=Table2.Code2)) and
> (Table1.Year=1900) and (Table2.Year2=1910)"
>
> Runs and ignores the (Table1.Code!=Table2.Code2) criteria when
> producing results
Valentina 1.x can do joins based on operator = only.
> "SELECT table1.*, table2.* FROM table1, table2 WHERE
> ((table1.ID=Table2.ID2) and (Table1.Code<>Table2.Code2)) and
> (Table1.Year=1900) and (Table2.Year2=1910)"
>
> Fails with an aggregate function warning message
>
> Since both the second and third query work fine in MYSQL I suspect it's
> a parser issue.
More correctly, this require other much slower algorithm of join that
operator =.
As for me, I believe that such design -- with 2 fields on join is OLD RDBMS
way. It is always better to have just one link fields.
Can you explain me (just for interest) the logic of above your 2 linked
tables and logic of above queries with <> ?
--
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