Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make records as fields in select-sql
Message
From
07/10/2003 10:07:19
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
07/10/2003 03:42:41
General information
Forum:
Visual FoxPro
Category:
CodeMine
Miscellaneous
Thread ID:
00835643
Message ID:
00835754
Views:
19
I don't think you can do it in a single command. You will need some programming to do this.

For instance, get all the possible values for "upcode", and then write a loop to add the field names (upcode_V, upcode_S, ...) to a query statement. Then, execute the query statement with macro substitution.

HTH,

Hilmar.

BTW, the < PRE > and < /PRE > tags are meant to be used for program code, not for the entire message.

>
>
>
>
>i have this in my table
>
>
>
>empno    upcode    cnt
>00001       V       2
>00001       S       1
>00001       H       2
>00002       1       1
>00002       3       2
>00003       V       3
>00004       S       5
>00004       N       1
>.
>.
>.
>.
>
>
>
>
>
>i want to select all records with fields empno, V, S, N.. etc.
>
>like i want each upcode to be the fields of my select..
>
>how do i do that?
>
>
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform