General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
I'm using VFP
>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.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only