Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a string using just one Select-SQL
Message
De
12/01/2006 08:38:44
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Divers
Thread ID:
01086002
Message ID:
01086011
Vues:
20
I don't think you can do this denormalization with SELECT - SQL only.

You might create a UDF that fetches all telephones for one person. Everything else can be done in the SELECT - SQL command.

>Hi guys,
>
>First of all, I will introduce you my tables:
>
>Table_A                       Table_B
>   ID_A (I) 1--------+        ID_B (I)
>   Name (C)          +------N ID_A (I)
>                              Phone (C)
>
>
>My point is create a cursor like that:
>
>ID_A   Name                   Phone
>0001   Rodolfo Duarte         1234-5678 1234-1234 1234-3333
>0002   Denise Andrade         2222-3333 2222-4444
>
>
>Notice that I have 2 records in my Table_A and 5 records in my Table_B.
>So, is it possible to create my Cursor using just one Select-SQL or I have to process it manually?
>
>TIA
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform