[ATTENTION] Chat with Frank about 3.1 cool news :-)
Erne
ernestogiannotta at tiscalinet.it
Mon Jun 25 04:49:53 CDT 2007
Hi Ruslnan,
On 25-giu-07, at 07:03, Ruslan Zasukhin wrote:
>
> rz 4:52pm no
> rz 4:52pm implicit links are for ANY links
> rz 4:53pm FK, OPtr, Binary
>
please elaborate this a little for me
Vale SQL has very handy feature of performing implicit joins when
using tables with object pointers as in:
Select * from TableA, TableB
Where TableA.ObjPtrToB = TableB.Recid // this could be entirely
omitted (But no mention of this can be found in SQL documentation)
So assuming we have a BinaryLink called AtoB_Link we can code:
Select * from TableA
join TableB on AtoB_Link
or using implicit link:
Select * from TableA, TableB // (Again no mention of this can be
found in SQL documentation)
Now let's say we have 2 ambiguos links like AtoB_Link_ManyToMany and
AtoB_Link_1toMany, here's the current correct syntax:
Select * from TableA
join TableB on AtoB_Link_ManyToMany
Couldnt' we have this syntax also?
Select * from TableA, TableB
join using AtoB_Link_ManyToMany
seems legit since the AtoB_Link_ManyToMany knows all about what
Tables it's linking and how
I know, it seems a redundant request, but it would greatly semplify
complex queries involving more tables like in:
select * from TableA
join TableB on AtoB_Link
join TableC On BtoC_Link
could be written as:
Select * from TableA, TableB, TableC
join using AtoB_Link, BtoC_Link
you see? a group for the From clause and a group for the Join clause
I know this is not standard SQL syntax, but that's because smart
links don't exist there.
Vale has them so why don't get the best from them?
Thanks for your kind attention.
Cool Runnings,
Erne.
/ |\ |\ | /
– |/ | \ | –
\ |\ | \| \
More information about the Valentina
mailing list