[ATTENTION] Chat with Frank about 3.1 cool news :-)

Erne ernestogiannotta at tiscalinet.it
Mon Jun 25 05:45:30 CDT 2007


Hi Ruslan,

thanks for answering

I'm talking about ambiguos links where we need specify what links to use

say we have TableA, TableB, TableC, AtoB_Link, AtoB_Link, AtoC_Link

Select * from TableA, TableB, TableC  // will spawn an Ambiguos link  
exception

so we must code:

select * from TableA
join TableB on AtoB_Link
join TableC On AtoB_Link

I'm asking for the ability to write:

Select * from TableA, TableB, TableC
    join using AtoB_Link, BtoC_Link


as for Wiki docs they say:
> Three Tables Linked as M:M
>
> To get even better impression from simplification that Valentina  
> offers take a look on example with three tables T1, T2, T3 linked  
> as Many to Many with help of two MM tables T12 and T23:
>
> Regular SQL:
>
> SELECT *
> FROM T1 JOIN T12 ON T1.ID      = T12.T1_Ptr
>         JOIN T2  ON T12.T2_Ptr = T2.ID
>         JOIN T23 ON T2.ID      = T23.T2_Ptr
>         JOIN T3  ON T23.T3_Ptr = T3.ID
> WHERE ...
> And now Valentina query:
>
> Valentina SQL:
>
> SELECT *
> FROM T1 JOIN T2 JOIN T3
> WHERE ...
but I get semantic error exception here
> Note, for INNER JOIN can be just FROM T1,T2,T3.
but I get link not found exception here

correct way will be

Select * From T1, T2, T3, T12, T13

and I love that! I always use that with Linker Tables
but for binary links I can't and that's what I'm asking for...

I see we can't put then in the From clause as they're not tables,
so let us put them in the Join clause






On 25-giu-07, at 12:12, Ruslan Zasukhin wrote:

> On 25/6/07 12:49 PM, "Erne" <ernestogiannotta at tiscalinet.it> 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?
>
> Valentina support this from 1.x
>
> You ask about ability list few tables in the FROM table by COMA,  
> right?
>
> And I believe that on this pages
>
> http://www.valentina-db.com/dokuwiki/doku.php? 
> id=paradigma:public:en:documen
> tation:valentina_vs:sql_features
>
> This is pointed! That you can for INNER join to use even more short  
> form.
>
>
>
>
> -- 
> Best regards,
>
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
>
> Valentina - Joining Worlds of Information
> http://www.paradigmasoft.com
>
> [I feel the need: the need for speed]
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina

Cool Runnings,
Erne.

/ |\ |\  | /
– |/ | \ | –
\ |\ |  \| \



More information about the Valentina mailing list