Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can this be done in SQL?
Message
 
 
À
25/02/2008 10:02:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01296067
Message ID:
01296074
Vues:
10
>
>CREATE CURSOR states ( st c(2) )
> INSERT into states VALUE('KS')
> INSERT into states VALUE('MO')
>
>CREATE CURSOR widgets (st c(2), misc c(3))
> INSERT INTO widgets values( 'KS', 'ABC')
> INSERT INTO widgets values( 'KS', 'DEF')
> INSERT INTO widgets values( 'KS', 'GHI')
> INSERT INTO widgets values( 'MO', 'ABC')
>
>I want to see the data as follows:
>
>  St    Widgets
>  ---   -----------
>  KS    ABC|DEF|GHI
>  MO    ABC
>
>Can this be done in SQL?
>
In VFP9 no without using UDF in SQL, which is not a good practice. AFAIK this question was discussed here, give me a sec. to find the solution.

I think there are some ways to do it in SQL Server, I saw this question discussed, but don't remember the solution off hand.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform