Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fancy SQL on child table
Message
De
28/09/2006 16:55:18
 
 
À
28/09/2006 16:52:03
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
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 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01157978
Message ID:
01157984
Vues:
27
>
>create cursor stylelist (style c(10),synonyms m)
>select styles
>scan
>  select synonyms
>  lcSynonym = ""
>  scan while fk = styles.pk
>   lcSynonyms = m.lcSynonyms + iif(empty(m.lcSynonyms),"",",") + synonyms.synonym
>  endscan
>  if _Tally > 0
>    lcSynonyms = "("+m.lcSynonyms+")"
>  endif
>  select styles
>  insert into stylelist values (styles.style,m.lcSynonyms)
>endscan
>select stylelist
>browse
>
I forgot to mention that the result as to be also with the OleDb provider. Thus, one big SQL to achieve all that.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform