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:
00495801
Vues:
16
This message has been marked as the solution to the initial question of the thread.
>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)

Wrap the stuff you want using < pre > and < /pre >. This will treat it as preformatted text (or code) and leave the 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
select row,min(column) as 'clow', max(column) as 'chigh',min(level) as 'llow',max(level) as 'lhigh';
   from mytable group by nrow
HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform