Igor Tandetnik wrote:

> How about this:
> 
> select A.*, B.*
> from TBOOKING A, TBOOKING B
> where A.EVENTTYPE = 3 and B.ID = (
>     select min(C.ID) from TBOOKING C
>     where C.EVENTTYPE = 4 and C.ID > A.ID
> );
> 
> Igor Tandetnik 

Igor, you are my hero ;-)
I've tried a subselect in the join but I've missed  the (somehow obvious)
min(ID) part.


Ingo
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to