Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to put in a string the result of a sql command
Message
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 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01460395
Message ID:
01460396
Vues:
46
Are you using VFP or SQL Server? If the later, which version. It is a piece of cake in SQL Server 2005 and up. In VFP you need to use custom function.

>Hello.
>
>I work in a shrimp plant. Each day several trucks bring shrimp to the plant, the document each truck has to declare the amount of shrimp that is carrying si called GUIA. Usually we send a group of 3 to 4 trucks to a supplier, that group is organized with a document called PESCA.
>
>The table PESCA has a relation one to many with table GUIA. The output that i'm trying to show in the report is like this:
>
>Pesca: 520 (Guias: 4777 4778 4780)
>
>I don't know how to put three or four lines of GUIA into one single string.
>
>this is part of the sql instruction I'm using
>
>SELECT pes.Pesca, gu.Guia, .....
>FROM lg_PescaC as pes ;
>LEFT JOIN lg_Guia as gu ON pes.Pesca = gu.Pesca
>
>I should replace gu.Guia with a function, but don't know how to write it using only sql.
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform