I have a table of borings with formation data.  The structure is something
like this:
 
Boring  Formation  Top  Bottom
A            S                  0         2
A            F                  2         22
A            D                 22       32
A            R                 32       150
B             F                  0         25
B             .                    .           .
.               .                    .           .
.               .                    .           .
 
I would like to select out the record that lies above each "R" formation
(i.e., the first formation above bedrock in this case).   The most
successful SQL statement that I have tried is:
 
Select Boring, Formation, Max(Top) 
>From Formtable
where Formation <>"R" group by Boring order by Boring
into firstup
 
Although this does return the correct depth of the "first formation", values
in the other fields are from the previous (higher) record.  How can I select
the correct record?
 
Thanks, Drew
 
________________________ 

Andrew Phillips, Ph.D. 
Quaternary Geology Section 
Illinois State Geological Survey 
________________________ 

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to