Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Question
Message
From
16/07/1997 07:05:17
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
 
 
To
15/07/1997 23:46:12
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapore
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00040139
Message ID:
00040168
Views:
33
>I have a table 'SIZE' with structure as follow:
>
>CODE C(10),
>SIZE C(1),
>SIZE_DESC C(10)
>
>A sample set of data is shown below:
>
>CODE SIZE SIZE_DESC
>
>001 1 S
>001 2 M
>001 3 L
>002 1 M
>002 2 L
>003 1 XS
>003 2 S
>003 3 L
>
>
>I need to report the data into the following way:
>
>CODE 1 2 3
>
>001 S M L
>002 M L
>003 XS S L
>
>How do I do this? If the 'SIZE_DESC' is numeric, I can do 'SELECT SUM(IIF(SIZE='1',SIZE_DESC,"") AS DESC1, .... GROUP BY CODE....'. But it is a character field, how do I do it?
>
>Thanks in advance.

try iif(allt(str(size))="1".......
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform