-
Hi,
I am just puzzeled by the results from the following Queries
I am checking for duplicates using a view. First query checks for duplicates on DW_BU_ID from March 2000 forward. The second query
looks thoughout all the view. (about 5 years 1995 to present ).
Why I is the results set for the whole view not including
the results from the first. I was expecting 4 rows from the second query... Is there a problem with this?
shoud the result of the second query include all DW_BU_ID's?
748866
755564
298978
306199
SQL> select cycle_eom_Date, dw_bu_id,count(*) from vw_tbl_risk_onus_unit_Oracle2n
2 where cycle_eom_date > '28-FEB-00'
3 having count(*) > 1
4 group by cycle_eom_date, dw_bu_Id
5 order by cycle_eom_date, dw_bu_Id;
CYCLE_EOM DW_BU_ID COUNT(*)
--------- ---------- ----------
31-JAN-01 748866 2
31-JAN-01 755564 2
Elapsed: 00:08:521.69
SQL>
SQL> select cycle_eom_Date, dw_bu_id, count(*) from vw_tbl_risk_onus_unit_Oracle2n
2 having count(*) > 1
3 group by cycle_eom_date, dw_bu_Id
4 order by cycle_eom_date, dw_bu_Id;
CYCLE_EOM DW_BU_ID COUNT(*)
--------- ---------- ----------
31-JAN-98 298978 2
30-JUN-98 306199 2
Any suggestions will be appreciated>..
Thank you,
Cristina
-
i don't see anything apparent. you'll have to check the underlying queries in the views. also make sure your running the query so it reconciles to the same underlying table (i.e. watch out for synonyms).
[btw, you don't need ORDER BY with GROUP BY]
d.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|