I having the following query using WITH clause.
with tbl as ( select 'A' as COL1 From SYSIBM.SYSDUMMY1 ) select * from tbl
The above query works fine but when i want to use is as sub table i am not able to do this in DB2, but works on Oracle & SQL Server.
select * from (with tbl as ( select 'A' as COL1 From SYSIBM.SYSDUMMY1 ) select * from tbl) a
Any ideas to make the above SQL work? I know it does not make sense to use is as sub-stable, but from one of our C++ application, the SELECT has to be the first word.
Best Regards
Edwin