ADW vs. CDW query
BugsJul 16 2009 — edited Jul 16 2009Guys,
Request your guidance.
We've recently migration one of our applications from CDW to ADW.
When I query a SQL in ADW, it gives different result set from that in ADW
CDW Query:
SELECT count(*)
FROM aaa b,
(SELECT DISTINCT cust_id,prod_id
FROM fact
WHERE sales_date >=
(SELECT MAX (TO_DATE (SUBSTR (subpartition_name, 9, 9), 'DDMONYYYY')) - 53 * 7
FROM all_tab_subpartitions
WHERE table_name = 'fact' ) a
WHERE a.cust_id = b.cust_id(+)
ADW query:
SELECT count(*)
FROM aaa b
,(SELECT DISTINCT cust_id,prod_id
FROM fact
WHERE sales_date >=(SELECT TO_DATE(SUBSTR(MAX(partition_name),8),'yyyymmdd') - 53 * 7
FROM all_tab_partitions
WHERE table_name='fact') a
WHERE a.cust_id = b.cust_id(+)
Wierd thing is that the aaa table from both cdw and adw returns the same record count and the inner query as well.
However the whole query as such returns different record count . ie. record count in cdw doesn't match to adw.
Could someone help me out why this happens?
Thanks a ton!!
Regards,
Bhagat