MySQL Forums
Forum List  »  Newbie

Re: Complex Query - subtract two event times
Posted by: Vlatko Šurlan
Date: March 13, 2006 11:15AM

Untested:

SELECT EventID, SUBTIME(dtStamp, (SELECT dtStamp FROM tblName AS t WHERE t.EventID=tblName.EventID AND ActionID=1)) AS Duration FROM tblName WHERE ActionID=2

http://www.docplanet.org/mysql/ - My collection of MySQL tips and tricks

Options: ReplyQuote


Subject
Written By
Posted
Re: Complex Query - subtract two event times
March 13, 2006 11:15AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.