dbUpgrade2_0022-to-2_0023_db2.sql 661 B

1234567891011121314151617181920
  1. -- Licensed Materials - Property of IBM
  2. --
  3. -- BI and PM: CM
  4. --
  5. -- (C) Copyright IBM Corp. 2008, 2009
  6. --
  7. -- US Government Users Restricted Rights - Use, duplication or disclosure
  8. -- restricted by GSA ADP Schedule Contract with IBM Corp.
  9. -- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. -- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. drop view CMOWNERCOUNT
  12. create view CMOWNERCOUNT(OBJID, OWN_NUMBER) as
  13. SELECT p2.OBJID, count(o.CMID)
  14. FROM CMOBJECTS o left outer join CMREFNOORD2 p1 on p1.CMID = o.CMID
  15. left outer join CMOBJPROPS1 p2 on p1.REFCMID = p2.CMID
  16. GROUP BY p2.OBJID