Thanks for your prompt reply.
I have read in the manual about dbquery. If i want to create a complex query then i have to use sql statement??The SQL Query remains the same but the only difference is that i have to make the whole SQL Query String and then pass it to sql().
--HM