Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL - Select & SUM
Message
From
31/07/2003 09:53:18
 
 
To
31/07/2003 08:05:57
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00815321
Message ID:
00815367
Views:
9
>I have a table as follows:
>
>
>NAME       PLANID      NOSHARES
>Russell      1            50
>Russell      4            45
>Mark         3            50
>Mark         2           100
>John         3            30
>Russell      1            70
>Mark         1            35
>Mark         2            20
>
>
>What I would like produced from an SQL Statement is :
>
>
>NAME     PLANID 1    PLANID 2   PLANID 3    PLANID 4
>Russell     120          0         0            45
>Mark         35         120       50             0
>John          0          0        30             0
>
>
>Is this possible? If so, How?
>
>Thanks in advance for your help,
>Russell

What you require is a cross-tab query. Use the Cross tab Wizard to generate it. Its very easy.

Cheers
Sanjay Kapoor

Relatively speaking is a conversation with Einstein
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform