This question has already been asked in stackoverflow and elsewhere:
- Is it possible to make a recursive SQL query ?
- Requêtes récursives avec les CTE - Exemples avec SQLServer 2003
But I would like to make this work for a report query in HP Quality-Center 10.
Anybody with insights into such technicalities?
A simple check:
with t1 (parent, child) as
(select * from all_lists t where t.al_father_id = '2') select * from t1
QC reports "Quality Center cannot run the query because it contains invalid statements".
Whereas with the following intentional typo
select * from all_lists t wher t.al_father_id = '2'
QC reports "The SQL query ... has failed to run, with the following error: Failed SQL ... [Mercury][Oracle JDBC Driver][Oracle]ORA-00933: SQL command not properly ended."
So I guess it answers two questions:
- the server is Oracle (though it does not give the version)
- with is not allowed through the QC interface