Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combining information from two records in a query

Status
Not open for further replies.

bravo6

IS-IT--Management
Mar 23, 2006
83
US
I am trying to take information from two different records and combine them to one record. See below:


Record Key Depart Return
2351 12JUN 13JUN
2351 15JUN 16JUN

These are two different segements of the same trip.

I want to end up with Depart Return
12JUN 16Jun

this gives me the actual trip duration from 12-16JUN.

Can anyone help?

Thanks
 
A starting point (SQL code):
SELECT [record Key], Min(Depart), Max(Return)
FROM yourTable
GROUP BY [record Key]

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top