Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Max(max of 3 fields) + corresponding field
Message
 
 
To
22/10/2001 18:05:38
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00571821
Message ID:
00571892
Views:
22
>Unfortunatly, it is not up to me to change the data structure. I know it is not the best structure, but I have to work with it. Normalizing the current table into a temp data sounds very do-able, although I'm not sure how that would be done. Any suggestion?
>THANKS!!
Select "1" AS something, t1 As Tn, Goal1 AS Goal ;
  FROM table1 ;
Union All ;
Select "2" AS something, t2 As Tn, Goal2 AS Goal ;
  FROM table1 ;
Union All ;
Select "3" AS something, t3 As Tn, Goal3 AS Goal ;
  FROM table1 ;
INTO CURSOR crsNorm

SELECT Tn, Goal From crsNorm;
  WHERE Tn In ( SELECT Max(Tn) From crsNorm)
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform