Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with select command
Message
 
 
À
16/04/2001 11:27:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00495792
Message ID:
00495802
Vues:
13
This message has been marked as a message which has helped to the initial question of the thread.
Folowing select statement will give the result you want
SELECT Row, MIN(Column) AS clow, MAX(Column) AS chigh, ;
	MIN(Level) AS llow, MAX(Level) AS lhigh ;
	FROM Mytable ;
	GROUP BY Row ;
	ORDER BY Row
>I have a table based on a warehouse inventory. Each record represents an item in the inventory and contains an Item #, ROW, COLUMN AND LEVEL. What I need to do is return a value for each unique row with the high and low values for column and level. See sample data below: (sorry about the lack of spacing. I don't know how to stop UT from removing spaces)
>
>
Item        Row         Column        Level
>
>123         1            02           A
>234         2            05           D
>345         3            01           A
>456         1            01           F
>567         2            03           A
>678         3            07           H
>789         1            04           C
>890         2            01           L
>901         3            09           F
>
>
>This should return
>
row        clow       chigh      llow       lhigh
>1          01          04         A          F
>2          01          05         A          L
>3          01          09         A          H
>Thanks for any help
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform