Recursive execs on a QSqlQuery
Hi everybody
is it possible to do recursive sql command executions on a QSqlQuery like this:
subset A = SELECT * FROM some_table WHERE type_id = magic_number
afterwards do another selection but on subset A like this (non valid syntax ;) )
SELECT * FROM subset A WHERE something
Thanks for help!
Re: Recursive execs on a QSqlQuery
Why not just
SELECT * FROM (SELECT * FROM some_table WHERE type_id = magic_number) WHERE something
Sql query is to query the database. After the first query you get a result set, which is not a datebase. You cannot run another sql query on the result set. You have to write code to loop through it.
Re: Recursive execs on a QSqlQuery
Thank you! That's a great idea. :)