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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Question for AirLine Logic...

Status
Not open for further replies.

devendrap

Programmer
Aug 22, 2001
50
US
Is there any website where we can find example for complicated SQL. Like for travel ticket for Airlines

Here is the Example.. From New York to Detroit to Chicago to Florida...

I have data in following pattern in the table:
TicketNno Place Date&Time
xx1 NewYork 2003-05-01 10.30AM
xx1 Detroit 2003-05-01 12.00Am
xx1 Chicago 2003-05-02 1.00AM
xx1 Florida 2003-05-03 4.00AM

I am looking for particular pattern, when Detroit to Chicago trip happen, compare it in following format:

TicketNo Date (Detroit) Date(Chicago)Difference(hour)
xx1 2003-05-01 12.00AM 2003-05-02 1.00AM 3
xx2 xxxx yyyy zz


Appreciate your help.

Thanks,
Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top