-- Licensed Materials - Property of IBM
--
-- BI and PM: CM
--
-- (C) Copyright IBM Corp. 2008, 2009
--
-- US Government Users Restricted Rights - Use, duplication or disclosure
-- restricted by GSA ADP Schedule Contract with IBM Corp.

-- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
-- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).


CREATE TABLE  CMREFNOORD2 (
	CMID		int NOT NULL,
	REFCMID		int NOT NULL,
	constraint PK_CMREFNOORD2 primary key (CMID) )

create index IDX_CMREFNOORD2 on CMREFNOORD1(REFCMID)

!MigrateIDBasedReferences pathBasedReferencesDef.xml idBasedReferencesDef.xml MigrateIDBasedReferences.log

!AddPISQL "delete from CMOBJPROPS6 where CMID in (select CMID from CMOBJECTS where CLASSID=5)" 

!AddPISQL "delete from CMOBJPROPS30 where CMID in (select CMID from CMOBJECTS where CLASSID=5)" 

!AddPISQL "delete from CMOBJPROPS6 where CMID in (select CMID from CMOBJECTS where CLASSID=9)" 

!AddPISQL "delete from CMOBJPROPS6 where CMID in (select CMID from CMOBJECTS where CLASSID=57)" 

!AddPISQL "delete from CMOBJPROPS15 where CMID in (select CMID from CMOBJECTS where CLASSID in (27,10,37,139,80,17,144,147))" 

!AddPISQL "delete from CMOBJPROPS6 where CMID in (select CMID from CMOBJECTS where CLASSID in (19,87))" 

!AddPISQL "delete from CMOBJPROPS18 where CMID in (select CMID from CMOBJECTS where CLASSID in (41,76,115,111))" 

!AddPISQL "delete from CMOBJPROPS14 where CMID in (select CMID from CMOBJECTS where CLASSID in (41,75,113,111))" 

!AddPISQL "delete from CMOBJPROPS6 where CMID in (select CMID from CMOBJECTS where CLASSID in (39))" 

!AddPISQL "drop table CMOBJPROPS12" "ignoreErrors"

!AddPISQL "drop table CMOBJPROPS21" "ignoreErrors"

!AddPISQL "drop table CMOBJPROPS8" "ignoreErrors"

!ReinitializeCM _deferred
