Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
(natural?) join question
Message
De
01/02/1999 13:38:26
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00182610
Message ID:
00182619
Vues:
9
>Using VFP 5.0a on WinNT 4.0 sp3.
>
>I want to do a select statement on two (or possibly more) tables where the results are based on an equal condition of a field from each table.
>
>If I do a "select * from a, b where a.id = b.id" I will get the desired result except that I'll get two fields named a.id_a and b.id_b, but no field named a.id or b.id.
>
>One way to do this would be to list all the desired fields in the output, but this list is very long and there is a limit (I think the list is limited by number of chacters), it is prone to errors, and just plain nasty looking.
>
>I think that what I am describing is a natural join, but I am not finding anything on natural join or the reference to the SELECT - SQL command.
>
>I do not care if I get a field named something like a.id_X or b.id_X, but I would like to guarantee a field named a.id (or tablename.id). Is there an easy way to do this?
>
>TIA,
>Marc Mandel
select a.id as id, * from a, b where a.id = b.id
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform