Hi DB2 Gurus,
I have a situation where i have to use the subquery in the from clause. But db2 is failing to execute the query. Below query working fine in oracle but its failing in DB2 v9.
Dont know if its a known issue. please advise.
SELECT
dim.code, fact.amt
FROM
dim INNER JOIN fact ON
(dim.code=fact.dim_code and
fact.type_id = (select max(type_ID) from type where type_name ='test'))
Dont ask me to put it in the where clause. Since the query generation is not in my hand its being populated automatically by a tool we are using.
Regards
G
I have a situation where i have to use the subquery in the from clause. But db2 is failing to execute the query. Below query working fine in oracle but its failing in DB2 v9.
Dont know if its a known issue. please advise.
SELECT
dim.code, fact.amt
FROM
dim INNER JOIN fact ON
(dim.code=fact.dim_code and
fact.type_id = (select max(type_ID) from type where type_name ='test'))
Dont ask me to put it in the where clause. Since the query generation is not in my hand its being populated automatically by a tool we are using.
Regards
G