Duplicated elements

We have a third party application that builds queries on the fly. The end users can choose one of four "types" of queries to run. The types, in most cases,
correspond to a particular table. The one exception to that is the "loanlevel" type which draws from more than one table.
This application uses a file called "tables.xml" that is intended to outline the fields available to the tool and where they live in the database. In some cases the
field is a calculation or a case statement. It is a very convoluted process that, at this point, is a requirement to work with. As it stands right now this is a static file
that is hand built and hard to maintain. Adding in new fields for the tool to "see" is cumbersome to say the least. We are attempting to make this a little more
dynamic and table driven so that we can have more control over the field this tool sees and how they are defined.
Therefore I am trying to write a SQL Statement to pull the data out of our home grown data dictionary tables in XML format this tool can use.
Possible xml format
<type>
<table_name>
<column_name>
<select_clause>
     <from_clause>
     <join_clause>
     <where_clause>
     <cohort>
</column_name>
</table_name>
</type>
An example of what my brain thinks it should look like
<loanlevel>
<table_name>TBL_LOAN</table_name
<column_name>AMRT_TERM
     <select_clause>AMRT_TERM</select_clause>
     <from_clause>TBL_LOAN</from_clause>
     <join_clause>null</join_clause</join_clause>
     <where_clause>null</where_clause>
     <cohort>Y</cohort>
</column_name>
<column_name>CITY_NAME
     <select_clause>CITY_NAME</select_clause>
     <from_clause>TBL_LOAN</from_clause>
     <join_clause>null</join_clause</join_clause>
     <where_clause>null</where_clause>
     <cohort>Y</cohort>
</column_name>
<column_name>LOAN_COUNT
     <select_clause>count(0)
     <from_clause>TBL_LOAN</from_clause>
     <join_clause>null</join_clause>
     <where_clause>null</where_clause>
     <cohort>N</cohort>
     </column_name>
</table_name>
<table_name>TBL_PROPERTY
     <column_name>
          <select_clause>....
     </column_name
</table_name>
</loanlevel>
<pnv_agg>
<table_name>
     <column_name>
     <select_clause>
     </column_name>
     </table_name>
</pnv_agg>
CREATE TABLE "MD_GET_DATA_TYPE"
( "GET_DATA_TYPE" VARCHAR2(10)
CREATE TABLE "DD_CMRG_TABLE"
( "TABLE_KEY" NUMBER(*,0) ,
"TABLE_NAME" VARCHAR2(30) ,
"TABLE_DESC" VARCHAR2(500),
"TABLE_TYPE_KEY" NUMBER(*,0) ,
"SOURCE" VARCHAR2(200),
"ROW_COUNT_EST" NUMBER(*,0),
"IS_EXTERNAL" CHAR(1),
"LOAD_FREQUENCY" VARCHAR2(30),
"LOAD_ROW_COUNT_EST" NUMBER(*,0),
"ORIG_CREATION_DATE" DATE ,
"ORIG_LOAD_DATE" DATE,
CONSTRAINT "PK_CMRG_TABLE" PRIMARY KEY ("TABLE_KEY") ENABLE
CREATE TABLE "DD_CMRG_COLUMN"
( "COLUMN_KEY" NUMBER(*,0) ,
"COLUMN_NAME" VARCHAR2(30),
"TABLE_KEY" NUMBER(*,0) ,
"DATA_TYPE" VARCHAR2(20),
"KEY_FIELD" CHAR(1),
"NULLABLE" CHAR(1),
"COLUMN_DESC" VARCHAR2(500),
"COLUMN_SOURCE" VARCHAR2(30),
"DATE_ADDED" DATE ,
"GET_DATA_TYPE" VARCHAR2(10),
"FROM_CLAUSE" VARCHAR2(255),
"JOIN_CLAUSE" VARCHAR2(255),
"WHERE_CLAUSE" VARCHAR2(255),
"COHORT" CHAR(1) DEFAULT 'N',
CONSTRAINT "PK_CMRG_COLUMN" PRIMARY KEY ("COLUMN_KEY")
CREATE TABLE "DD_CMRG_CALC_COLUMN"
( "CALC_COLUMN_KEY" NUMBER(*,0),
"GET_DATA_TYPE" VARCHAR2(10),
"FIELD_NAME" VARCHAR2(30),
"SELECT_CLAUSE" VARCHAR2(255),
"FROM_CLAUSE" VARCHAR2(255),
"JOIN_CLAUSE" VARCHAR2(255),
"WHERE_CLAUSE" VARCHAR2(255),
"COHORT" CHAR(1),
CONSTRAINT "PK_CMRG_CALC_COLUMN" PRIMARY KEY ("CALC_COLUMN_KEY")
insert into md_get_data_type (get_data_type) values ('loanlevel');
insert into md_get_data_type (get_data_type) values ('pnv_agg');
insert into md_get_data_type (get_data_type) values ('loans_agg');
insert into dd_cmrg_table (table_key,table_name) values (18,'TBL_ARM');
insert into dd_cmrg_table (table_key,table_name) values (19,'TBL_CMRG_PRODUCT');
insert into dd_cmrg_table (table_key,table_name) values (20,'TBL_DATE');
insert into dd_cmrg_table (table_key,table_name) values (21,'TBL_ED_PRODUCT');
insert into dd_cmrg_table (table_key,table_name) values (22,'TBL_GEOGRAPHY');
insert into dd_cmrg_table (table_key,table_name) values (23,'TBL_INVESTOR');
insert into dd_cmrg_table (table_key,table_name) values (24,'TBL_LOAN');
insert into dd_cmrg_table (table_key,table_name) values (25,'TBL_LOAN_AGGREGATION');
insert into dd_cmrg_table (table_key,table_name) values (26,'TBL_LOAN_PERIODIC_SNAPSHOT');
insert into dd_cmrg_table (table_key,table_name) values (27,'TBL_LOAN_STATUS');
insert into dd_cmrg_table (table_key,table_name) values (28,'TBL_PNV_AGGREGATION');
insert into dd_cmrg_table (table_key,table_name) values (29,'TBL_PROPERTY');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (1,'RATE_CAP_LIFE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (2,'ARM_CONVERSION_OPTION',18,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (3,'SUBSEQUENT_RESET_MONTHS',18,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (4,'REPRICE_FREQ',18,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (5,'RATE_INCR_LIFE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (6,'RATE_INCR_CYCLE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (7,'RATE_DECR_CYCLE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (8,'TEASER_END_DATE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (9,'PMT_INCR_LIFE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (10,'PMT_INCR_CYCLE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (11,'INITIAL_RESET_YEARS',18,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (12,'RATE_DECR_LIFE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (13,'CMRG_ARM_INDEX',18,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (14,'PMT_DECR_LIFE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (15,'INTEREST_RATE_CD',18,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (16,'IS_FIXED_ARM_HYBRID',18,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (17,'IS_NEG_AMRT',18,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (18,'PMT_CHG_FREQ',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (19,'PMT_DECR_CYCLE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (20,'ARM_KEY',18,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (21,'IS_FIXED_ARM_HYBRID',19,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (22,'SYS_SUB_PROD_CD',19,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (23,'SYS_PROD_CD',19,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (24,'PROGRAM_CD',19,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (25,'PRODUCT_LINE_CD',19,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (26,'PMT_TYPE_CD',19,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (27,'IS_RELO',19,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (28,'IS_FHA_VA',19,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (29,'IS_CONVENTIONAL',19,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (30,'IS_CONF_ORIG_BAL',19,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (31,'IS_BALLOON',19,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (32,'IS_ALT_A',19,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (33,'CMRG_PRODUCT_KEY',19,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (34,'CMRG_PRODUCT',19,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (35,'CMRG_PRODUCT_GROUP',19,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (36,'AS_OF_DATE',20,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (37,'DATE_KEY',20,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (38,'IS_HOLIDAY',20,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (39,'IS_WEEKDAY',20,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (40,'LEVEL_7_DESC',21,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (41,'ED_PRODUCT_DESC',21,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (42,'ED_PRODUCT_ID',21,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (43,'CENSUS_TRACT_CD',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (44,'CITY_NAME',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (45,'COUNTY_NAME',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (46,'GEOGRAPHIC_LOC_CD',22,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (47,'GEOGRAPHY_KEY',22,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (48,'PROPERTY_ZIP',22,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (49,'SMSA_CD',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (50,'STATE',22,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (51,'IS_FNMA_FHLMC_GNMA',23,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (52,'SERVICING_PORTFOLIO_CD',23,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (53,'ORIG_BANK_CD',23,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (54,'INVESTOR_KEY',23,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (55,'CMRG_SEGMENT',23,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (56,'CMRG_PORTFOLIO',23,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (57,'ORIG_BANK_NAME',23,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (58,'BORROWER_DEBT_BACK',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (59,'EXTRACT_SOURCE_SYS',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (60,'ORIG_DATE',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (61,'MATURITY_DATE',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (62,'MARGIN_GROSS',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (63,'LOAN_KEY',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (64,'LOAN_ID',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (65,'LOAN_FEE_POINTS',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (66,'LIEN_POSITION_CD',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (67,'IS_COBORROWER',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (68,'FIRST_DUE_DATE',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (69,'EXTRACT_AS_OF_DATE',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (70,'DOCUMENTATION_LEVEL',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (71,'DOCUMENTATION_CD',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (72,'CREDIT_CLASS_CD',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (73,'CMRG_CUSTOMER_ID',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (74,'CHANNEL_CD',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (75,'CHANNEL',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (76,'BORROWER_INCOME',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (77,'ORIG_COMBINED_LTV',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (78,'AMRT_TERM',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (79,'BROKER_CORRESPONDENT_ID',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (80,'PURCHASE_AMT',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (81,'ORIG_BAL',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (82,'PURPOSE',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (83,'PREPAY_PEN_FLAG',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (84,'PREPAY_PEN_FEE_TERM',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (85,'PREPAY_PEN_FEE_CD',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (86,'ORIG_TERM_YEARS',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (87,'ORIG_RATE',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (88,'ORIG_PROPERTY_VALUE',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (89,'ORIG_PMT_AMT',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (90,'ORIG_LTV',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (91,'ORIG_FICO',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (92,'ORIG_TERM',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (93,'PURPOSE_CD',24,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (94,'PREPAY_PEN_FLAG',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (95,'WA_CUR_GROSS_RATE',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (96,'WA_SMM_PREV',25,'loanlevel','','','','N');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (97,'SUM_PREPMT_PREV',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (98,'SUM_SCHED_BAL_PREV',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (99,'SUM_CUR_BAL',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (100,'LOAN_COUNT',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (101,'GROUP_CUR_FICO',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (102,'GROUP_CUR_LTV',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (103,'GROUP_CUR_SIZE',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (104,'GROUP_ORIG_FICO',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (105,'DATE_KEY',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (107,'WA_ORIG_FICO',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (108,'STATE',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (109,'PROPERTY_TYPE',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (110,'PURPOSE',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (111,'DOCUMENTATION_LEVEL',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (112,'OCCUPANCY',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (113,'CHANNEL',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (114,'VINTAGE',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (115,'NOTE',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (116,'CMRG_PORTFOLIO',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (117,'CMRG_PRODUCT_GROUP',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (118,'CMRG_PRODUCT',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (119,'IS_NEW',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (121,'WA_ORIG_TERM',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (122,'WA_ORIG_LTV',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (123,'WA_CUR_FICO',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (124,'WA_CUR_LTV',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (125,'SUM_SCHED_BAL_WA',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (126,'WA_AGE',25,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (127,'HOME_PRICE_INDEX',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (128,'IS_NEW',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (129,'IS_CONF_CUR_BAL',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (130,'INVESTOR_KEY',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (131,'INV_SERVICING_SPREAD',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (132,'INV_IO_STRIP_3',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (133,'INV_IO_STRIP_2',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (134,'INV_IO_STRIP_1',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (135,'LAST_PMT_DATE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (136,'PROPERTY_KEY',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (137,'INV_GUARANTOR_FEE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (138,'LOAN_KEY',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (139,'LOAN_STATUS_KEY',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (140,'MI_TYPE_CD',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (141,'MIAC_TRANCHE_ID',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (142,'NEXT_PAYMENT_DATE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (143,'GEOGRAPHY_KEY',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (144,'CMRG_PRODUCT_KEY',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (145,'DROPPED',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (146,'REMAIN_PMTS',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (147,'REMAIN_TERM',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (148,'SCHED_BAL',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (149,'PAYOFF_DATE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (150,'ARM_NEG_AMRT_LIMIT',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (151,'ARM_CONVERSION_DATE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (152,'ARM_KEY',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (153,'GL_ACCOUNT',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (154,'ARM_NEG_AMRT_EQ_DATE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (155,'DATE_KEY',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (156,'ARM_NEXT_REPRICE_DATE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (157,'ARM_PMT_ADJUST_DATE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (158,'CMRG_INDICATOR',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (159,'CUR_BAL',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (160,'CUR_DAYS_DELQ',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (161,'CUR_DELQ_MBA',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (162,'CUR_DELQ_OTS',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (163,'CUR_NET_RATE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (164,'CUR_FICO',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (165,'CUR_PROPERTY_VALUE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (166,'ARM_NEG_AMRT_CUR_BAL',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (167,'CUR_PMT',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (168,'CUR_MONTHS_DELQ',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (169,'CUR_LTV',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (170,'CUR_GROSS_RATE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (171,'CUR_FM_VALUE_DATE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (172,'CUR_FM_VALUE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (173,'CUR_FICO_DATE',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (174,'CUR_PMT_TOTAL',26,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (175,'BANKRUPTCY_TYPE',27,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (176,'REO_STATUS_CD',27,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (177,'RECOURSE_CD',23,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (178,'PAYOFF_REASON_CD',27,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (179,'LOAN_STATUS_KEY',27,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (180,'FCLOS_STATUS_CD',27,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (181,'BANKRUPTCY_CD',27,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (182,'LOAN_STATUS_CD',27,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (183,'WA_CUR_SIZE',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (184,'WA_ORIG_TERM',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (185,'WA_AGE',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (186,'WA_ORIG_SIZE',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (187,'WA_CUR_GROSS_RATE',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (188,'WA_ORIG_FICO',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (189,'LOAN_COUNT',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (190,'WA_CUR_LTV',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (191,'WA_CUR_FICO',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (192,'WA_ORIG_LTV',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (193,'WA_SMM_PREV',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (194,'SUM_PREPMT_PREV',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (195,'SUM_CUR_BAL',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (196,'VINTAGE',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (197,'NOTE',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (198,'CMRG_PORTFOLIO',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (199,'CMRG_PRODUCT',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (200,'IS_NEW',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (201,'DATE_KEY',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (202,'SUM_SCHED_BAL_WA',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (203,'SUM_SCHED_BAL_PREV',28,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (204,'PROPERTY_TYPE_DESC',29,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (205,'DWELLING_UNITS',29,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (206,'OCCUPANCY',29,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (207,'OCCUPANCY_CD',29,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (208,'OWNERSHIP_TYPE_CD',29,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (209,'OWNERSHIP_TYPE_DESC',29,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (210,'PROPERTY_KEY',29,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (211,'PROPERTY_TYPE',29,'loanlevel','','','','Y');
insert into dd_cmrg_column (column_key,column_name,table_key,get_data_type,from_clause,join_clause,where_clause,cohort) values (212,'PROPERTY_TYPE_CD',29,'loanlevel','','','','Y');
insert into dd_cmrg_calc_column values (382,'loanlevel','age','round(months_between(cmrg_data.TBL_DATE.as_of_date,cmrg_data.TBL_LOAN.orig_date),0)','','something','nothing','Y');
insert into dd_cmrg_calc_column values (386,'loanlevel','loan_count','count(0)','','','','N');
insert into dd_cmrg_calc_column values (387,'loanlevel','wac','CASE WHEN SUM(TBL_LOANS_DYNAMIC.sched_bal) != 0 THEN SUM(TBL_LOANS_DYNAMIC.cur_gross_rate*TBL_LOANS_DYNAMIC.sched_bal)/SUM(TBL_LOANS_DYNAMIC.sched_bal) ELSESUM(0) END','','','','Y');
insert into dd_cmrg_calc_column values (388,'loanlevel','prepay_penalty','SUM(CASE WHEN TBL_LOANS_STATIC.prepay_pen_flag = '||''''||'Y'||''''||' THEN TBL_LOANS_DYNAMIC.cur_book_bal ELSE 0 END)','','','','Y');
insert into dd_cmrg_calc_column values (389,'pnv_agg','loan_size','round(SUM(PRINBAL)/sum(LOANCOUNT),2)','','','(gl_account_id BETWEEN 15000 AND 21000 OR gl_account_id > 26000)','Y');
insert into dd_cmrg_calc_column values (390,'pnv_agg','wac','CASE WHEN SUM(TBL_LOANS_DYNAMIC.sched_bal) != 0 THEN SUM(TBL_LOANS_DYNAMIC.cur_gross_rate*TBL_LOANS_DYNAMIC.sched_bal)/SUM(TBL_LOANS_DYNAMIC.sched_bal) ELSE SUM(0) END','','','','N');
select xmlelement ("Type",get_data_type,
sys_xmlgen(
(select xmlagg(
xmlelement("Table_Name",table_name,
     xmlelement("Column_Name",xmlagg(xmlforest(column_name||' ('||column_key||')' as "Column_Name",
          xmlforest(
               decode(select_clause,null,column_name,select_clause) select_clause,
               case
               when c.from_clause is not null then c.from_clause
               when b.from_clause is not null then b.from_clause
               else a.table_name
               end from_clause,
               case
               when c.join_clause is not null then c.join_clause
               when b.join_clause is not null then b.join_clause
               else 'null'
               end join_clause,
               case
               when c.where_clause is not null then c.where_clause
               when b.where_clause is not null then b.where_clause
               else 'null'
               end where_clause,
               case
               when c.cohort is not null then c.cohort
               when b.cohort is not null then b.cohort
               end cohort
               ) as "Column_Details")))))
from dd_cmrg_table a, dd_cmrg_column b, dd_cmrg_calc_column c
where a.table_key=b.table_key
and b.get_data_type=t.get_data_type
and c.get_data_type=t.get_data_type
group by table_name,column_name
from md_get_data_type t
<Type>loanlevel<ROW>
<Table_Name>TBL_ARM
<Column_Name>
<Column_Name>ARM_CONVERSION_OPTION (2)</Column_Name>
<Column_Details>
<SELECT_CLAUSE>SUM(CASE WHEN TBL_LOANS_STATIC.prepay_pen_flag = &apos;Y&apos; THEN TBL_LOANS_DYNAMIC.cur_book_bal ELSE 0 END)</SELECT_CLAUSE>
<FROM_CLAUSE>TBL_ARM</FROM_CLAUSE>
<JOIN_CLAUSE>null</JOIN_CLAUSE>
<WHERE_CLAUSE>null</WHERE_CLAUSE>
<COHORT>Y</COHORT>
</Column_Details>
<Column_Name>ARM_CONVERSION_OPTION (2)</Column_Name>
<Column_Details>
<SELECT_CLAUSE>CASE WHEN SUM(TBL_LOANS_DYNAMIC.sched_bal) != 0 THEN SUM(TBL_LOANS_DYNAMIC.cur_gross_rate*TBL_LOANS_DYNAMIC.sched_bal)/SUM(TBL_LOANS_DYNAMIC.sched_bal) ELSE SUM(0) END</SELECT_C
LAUSE>
<FROM_CLAUSE>TBL_ARM</FROM_CLAUSE>
<JOIN_CLAUSE>null</JOIN_CLAUSE>
<WHERE_CLAUSE>null</WHERE_CLAUSE>
<COHORT>Y</COHORT>
</Column_Details>
<Column_Name>ARM_CONVERSION_OPTION (2)</Column_Name>
<Column_Details>
<SELECT_CLAUSE>count(0)</SELECT_CLAUSE>
<FROM_CLAUSE>TBL_ARM</FROM_CLAUSE>
<JOIN_CLAUSE>null</JOIN_CLAUSE>
<WHERE_CLAUSE>null</WHERE_CLAUSE>
<COHORT>N</COHORT>
</Column_Details>
<Column_Name>ARM_CONVERSION_OPTION (2)</Column_Name>
<Column_Details>
<SELECT_CLAUSE>round(months_between(cmrg_data.TBL_DATE.as_of_date,cmrg_data.TBL_LOAN.orig_date),0)</SELECT_CLAUSE>
<FROM_CLAUSE>TBL_ARM</FROM_CLAUSE>
<JOIN_CLAUSE>something</JOIN_CLAUSE>
<WHERE_CLAUSE>nothing</WHERE_CLAUSE>
<COHORT>Y</COHORT>
</Column_Details>
</Column_Name>
</Table_Name>
<Table_Name>TBL_ARM
<Column_Name>
<Column_Name>SUBSEQUENT_RESET_MONTHS (3)</Column_Name>
<Column_Details>
<SELECT_CLAUSE>SUM(CASE WHEN TBL_LOANS_STATIC.prepay_pen_flag = &apos;Y&apos; THEN TBL_LOANS_DYNAMIC.cur_book_bal ELSE 0 END)</SELECT_CLAUSE>
<FROM_CLAUSE>TBL_ARM</FROM_CLAUSE>
<JOIN_CLAUSE>null</JOIN_CLAUSE>
<WHERE_CLAUSE>null</WHERE_CLAUSE>
<COHORT>Y</COHORT>
</Column_Details>
<Column_Name>SUBSEQUENT_RESET_MONTHS (3)</Column_Name>
<Column_Details>
<SELECT_CLAUSE>CASE WHEN SUM(TBL_LOANS_DYNAMIC.sched_bal) != 0 THEN SUM(TBL_LOANS_DYNAMIC.cur_gross_rate*TBL_LOANS_DYNAMIC.sched_bal)/SUM(TBL_LOANS_DYNAMIC.sched_bal) ELSE SUM(0) END</SELECT_C
LAUSE>
<FROM_CLAUSE>TBL_ARM</FROM_CLAUSE>
<JOIN_CLAUSE>null</JOIN_CLAUSE>
<WHERE_CLAUSE>null</WHERE_CLAUSE>
<COHORT>Y</COHORT>
</Column_Details>
</Column_Name>
</Table_Name>
<Table_Name>TBL_LOAN_PERIODIC_SNAPSHOT
<Column_Name>
<Column_Name>RATE_CAP_LIFE (1)</Column_Name>
<Column_Details>
<SELECT_CLAUSE>SUM(CASE WHEN TBL_LOANS_STATIC.prepay_pen_flag = &apos;Y&apos; THEN TBL_LOANS_DYNAMIC.cur_book_bal ELSE 0 END)</SELECT_CLAUSE>
<FROM_CLAUSE>TBL_LOAN_PERIODIC_SNAPSHOT</FROM_CLAUSE>
<JOIN_CLAUSE>null</JOIN_CLAUSE>
<WHERE_CLAUSE>null</WHERE_CLAUSE>
<COHORT>Y</COHORT>
</Column_Details>
<Column_Name>RATE_CAP_LIFE (1)</Column_Name>
<Column_Details>
<SELECT_CLAUSE>CASE WHEN SUM(TBL_LOANS_DYNAMIC.sched_bal) != 0 THEN SUM(TBL_LOANS_DYNAMIC.cur_gross_rate*TBL_LOANS_DYNAMIC.sched_bal)/SUM(TBL_LOANS_DYNAMIC.sched_bal) ELSE SUM(0) END</SELECT_C
LAUSE>
<FROM_CLAUSE>TBL_LOAN_PERIODIC_SNAPSHOT</FROM_CLAUSE>
<JOIN_CLAUSE>null</JOIN_CLAUSE>
<WHERE_CLAUSE>null</WHERE_CLAUSE>
<COHORT>Y</COHORT>
</Column_Details>
<Column_Name>RATE_CAP_LIFE (1)</Column_Name>
<Column_Details>
<SELECT_CLAUSE>count(0)</SELECT_CLAUSE>
<FROM_CLAUSE>TBL_LOAN_PERIODIC_SNAPSHOT</FROM_CLAUSE>
<JOIN_CLAUSE>null</JOIN_CLAUSE>
<WHERE_CLAUSE>null</WHERE_CLAUSE>
<COHORT>N</COHORT>
</Column_Details>
<Column_Name>RATE_CAP_LIFE (1)</Column_Name>
<Column_Details>
<SELECT_CLAUSE>round(months_between(cmrg_data.TBL_DATE.as_of_date,cmrg_data.TBL_LOAN.orig_date),0)</SELECT_CLAUSE>
<FROM_CLAUSE>TBL_LOAN_PERIODIC_SNAPSHOT</FROM_CLAUSE>
<JOIN_CLAUSE>something</JOIN_CLAUSE>
<WHERE_CLAUSE>nothing</WHERE_CLAUSE>
<COHORT>Y</COHORT>
</Column_Details>
</Column_Name>
</Table_Name>
</ROW>
</Type>
<Type>pnv_agg</Type>
<Type>loans_agg</Type>

If I'm reading this correctly,
Would it be easier to work with collections, types, objects and views? Then you could have loanlevel, priv_agg, or loans_agg types.
If not please ignore post.

Similar Messages

  • Copying/Duplicating elements is very slow in Edge Reflow

    Hi,
    When copying/duplicating elements in Edge Reflow that have quite a few nested areas it becomes very slow (sometimes taking 5-10 minutes!) I've tried it on a few machines in case it was a hardware issue but it seems sluggish on everything I try. Does anyone else have this issue and is it a software bug?
    Cheers,
    Rob.

    Hi Vic,
    Thanks for your response.
    Copying and pasting a single div is fine but as soon as there are multiple nested divs it rapidly becomes very slow to copy and paste (especially if there is quite a lot on the page). Quite often we are finding that we are having to force quit Reflow because it just hangs for 10 minutes or more. Areas such as headers that are quite complex and have a lot of nested divs we are therefore forced to manually copy bit by bit.
    Many thanks,
    Rob.

  • Error Report on Duplicating Elements

    An Error occured after duplicating an Elements. If you right click any item on the Elements it will show you an Error Message "An error occured. Please save your work and restart Edge Animate.".. Below are the steps to get the Error:
    1. Right click an element on Elements Box, then click Duplicate
    2. A duplicate copy of that element will appear, right clicking anywhere in the screen is not possible anymore an Error message will display "An error occured. Please save your work and restart Edge Animate."
    Edge is a wonderful product! it makes my HTML5 development faster.. Thank you so much!

    Hi Joe,
    I am using EA 1.5, It happen when I try to duplicate an element that has tween.. below are the step to reproduce the error from start:
    1. Create New File
    2. Click the rounded object tool,  then draw in the stage.
    3. Select the rounded object, then click the x under position and size to add keyframe.
    4. Drag the timeline pointer to any time.
    5. Now, drag the object to any X position to create tween animation
    6. After tweening, duplicate the rounded object under the Elements
    7. Now, right clicking anywhere in the screen will display an error message
    Thank you so much joe

  • Bug Report: Error when duplicating elements in symbol

    I think I saw some posts on this issue.
    Sequence:
    element ellipse created on the stage symbol
    png added to the stage symbol
    attempt to duplicate ellipse by right-clicking and choosing duplicate
    Error: "an error has occured. Save your work and restart Edge Animate
    This error has occured several time in several compostion.
    Restarting Edge did correct the issue this time but I had some occasions when the whole composition returned with nothing in it which is really frustrating. Other occasions reopened to the last saved not including the save done after the error.
    REQUEST:
    Autosave as with InDesign would be so great!!! 

    Hi resdesign,
    Is this the same issue reported here: http://forums.adobe.com/thread/1160457?tstart=0
    If you don't have any transitions on the element you duplicate, please add more detail on how to reproduce this, or provide a sample file that shows the error.
    Thanks,
    Joe

  • How could i check if my list has at least one duplicated element?

    public boolean hasDuplicate (List l){
    heheh. can somebody help me on this? i am a beginner. a novice. hehe. thanks!
    Edited by: coldheroine on Apr 25, 2008 11:49 AM

    Do you need to nest for loops here? Think about how you'd figure something like this out on paper and the algorithm will come to you.
    Also, when posting your code, please use code tags so that your code will retain its formatting and be readable. To do this, you can will need to paste already formatted code into the forum, highlight this code, and then press the "code" button at the top of the forum Message editor prior to posting the message. You may want to click on the Preview tab to make sure that your code is formatted correctly. Another way is to place the tag &#91;code] at the top of your block of code and the tag &#91;/code] at the bottom, like so:
    &#91;code]
      // your code block goes here.
      // note the differences between the tag at the top vs the bottom.
    &#91;/code]or
    {&#99;ode}
      // your code block goes here.
      // note here that the tags are the same.
    {&#99;ode}good luck

  • 'Save As' removes preloader. Can't save as publish because elements are duplicated?

    Hi,
    Having some real problems with edge recently. First I'm having to work off a .html file because edge crashed and I was unable to work from previous templates.
    Now my project seems to have duplicated elements as circled here and wrapped in tags.
    When I click 'Preview In Browser' the file looks great, but when I actually publish the project, it looks more like this:
    So to get around the problem, if I just 'Save As' a html file the project saves nicely without duplicating all the images, but for some reason removes the preloader?
    Please help!
    - Scott.

    Ok, the two elements/images I have put into a recentangle seem to be the same thing. If I turn either of them off (turn their visability off), the blue background of my project disappears.
    The only one I can choose to 'swap' is the one without the </> tag infront of it (this element with the </> tag is also not deletable).
    When I click swap image, it brings up all the images involved in my project, But I don't want to swap the image - I want to keep the image, and when I publish my project, I want it to not destory my .html graphic.
    I appreciate your help, and I hope I'm not being really silly and not understanding what you are saying!
    What should I be swapping the image too, and how does this get rid of the elements that have the </> infront of them? - Scott.
    PS: OR, is there a way to just Save As and it not delete my preloader! That would be nice!

  • CMR for ordered, duplicated-allowed elements (aka List)

    If I want to implement a CMR field that has collection of element which maintain ordered and allow duplicated elements (like java.util.List implementation), what should I do since EJB spec only supports java.util.Collection and java.util.Set?

    you'll need a pk for the antity bean with duplicates anyway, so why not an auto-increment field or equivalent?

  • HOW TO DELETE DUPLICATE ELEMENT IN A VECTOR

    Hi everybody!
    If I've a vector like this vectA={apple,orange,grape,apple,apple,banana}
    and I want final result be vectB={apple,orange,grape,banana}.
    How should I compare each element in vectA and delete duplicate element. Like here duplicated element is apple. Only one apple remain in the vectB.
    Any help,
    Thanks.

    Hello all. Good question and good answers, but I would like to elaborate.
    To begin with, you specifically asked to map the following:
    {apple,orange,grape,apple,apple,banana} ==> {apple,orange,grape,banana}
    Both of cotton.m's solutions do NOT do this, unfortunately. They are both useful in particular cases though, so think about what you're trying to do:
    cotton.m's first solution is best if order does not matter. In fact, as flounder first stated, whenever order doesn't matter, your most efficient bet is to use a Set instead of a List (or Vector) anyways.
    Set vectB = new HashSet(vectA);This code maps to {banana, orange, grape, apple}, because HashSets are "randomly" ordered.
    cotton.m's second solution is good if you want to impose NEW ordering on the List.
    Set vectB = new TreeSet(vectA);This code maps to {apple, banana, grape, orange}, because TreeSet uses alphabetical-order on Strings by default.
    java_2006, your solution is the most correct, but it's a little verbose for my taste :)
    more importantly, the runtime-efficiency is pretty bad (n-squared). calling Vector.contains performs (at worst) n comparisons; you're going to call it n times! Set.contains usually performs 2 comparisons (constant, much better), so I suggest you USE a Set to do the filtering, while still sticking with your good idea to use a List. When the ordering is "arbitrary" (so can't use TreeSet) but still relevant (so can't use HashSet), you're basically talking about a List.
    I think saving A LOT of time is worth using A LITTLE extra space, so here, let's save ourself some runtime, and some carpal-tunnel.
    import java.util.*;
    class Foo {
         public static void main(String[] args) {
              String[] fruits = {"apple","orange","grape","apple","apple","banana"};
              List     l = Arrays.asList(fruits),
                   m = filterDups(l);
              System.out.println(m);
         // remember, both of the following methods use O(n) space, but only O(n) time
         static List filterDups(List l) {
              List retVal = new ArrayList();
              Set s = new HashSet();
              for (Object o : l)
                   if (s.add(o))
                        retVal.add(o);     // Set.add returns true iff the item was NOT already present
              return retVal;
         static void killDups(List l) {
              Set s = new HashSet();
              for (Iterator i = l.iterator(); i.hasNext(); )
                   if (! s.add(i.next()))     
                        i.remove();
         // honestly, please don't use Vectors ever again... thanks!
         // if you're going to be a jerk about it, and claim you NEED a Vector result
         // then here's your code, whiner
         public static void mainx(String[] args) {
              String[] fruits = {"apple","orange","grape","apple","apple","banana"};
              List l = Arrays.asList(fruits);
              Vector v = new Vector(l);
              killDups(v);
              System.out.println(v);
    }

  • Mapping attributes to elements

    Hi,
    I have a file that looks similar to this...(I've simplified it for the post)
    <XPacket>
       <XField Type="integer" Name="SerialNumber">13781</XField>
       <XField Type="string" Name="Mfr">Johnson</XField>
       <XField Type="XPacket" Name="Counters">
          <XField Type="XPacketArray" Name="Metrics" ArraySize="20">
            <XElement Type="XPacket" Index="0">
               <XField Type="integer" Name="position">7</XField>
               <XField Type="integer" Name="value">523</XField>
            <XElement Type="XPacket" Index="1">
               <XField Type="integer" Name="position">9</XField>
               <XField Type="integer" Name="value">62</XField>
           </XElement>
         </XField>
       </XField>
    </XPacket>
    First of all there's a problem defining a data-type for the mapping; it's ugly, but I've been able to do that using 'occurs' for each of the duplicated elements.
    I need to map this to a file that looks like this.
    <Output>
      <SerialNumber>13781</SerialNumber>
      <Mfr>Johnson</Mfr>
      <Counters>
        <Metrics>
          <Reading0>
            <position>7</position>
            <value>523</value>
          </Reading0>
          <Reading1>
            <position>9</position>
            <value>62</value>
          </Reading1>
        </Metrics>
      </Counters>
    </Output>
    Essentially, I need to convert the NAME attribute value (where it exists) to an element and fetch the associated value.
    I've tried a few different approaches with graphical mapping, but I reckon that's the wrong choice and it seems to me that an XSLT mapping is the best approach. With help from w3schools, I'm getting close, but I'm having trouble with the complex elements (where an element has a child element).
    Any help would be gratefully accepted !!
    Thanks,
    Guy

    in   CREATE OBJECT lr_choice the object id have to refer to name of node.
      CREATE OBJECT lr_choice
         EXPORTING
           id = 'CHOICE'.

  • How to implement this? please help

    In my java class, I have a string array called strarray which hold serveral elements, some of the elements have the same value , for example, the first element is "swimming", the forth element is also swimming. I use a for loop to get each element and give it to arrayHolder which is also a array with the same size as strarray. Now, what I want is: I defined a Vector called element I want this vector to filter out the element from arrayHolder, get the name of non-duplicated name from the arrayHolder, the result should be inside the element vector (swimming,walking,running,dancing), no duplicated name. My code is like follows:
    import java.util.*;
    import java.io.*;
    public class arrayTest{
    public static void main(String arg[]){
    String[] strarray={"swimming","running","walking","swimming","dancing","running"};
    String[] arrayHolder=new String[strarray.size];
    Vector element=new Vector();
    for(int i=0;i<strarray.length();i++){
    arrayHolder[  i  ]=strarray[  i  ];
    /* What should I do next to get the non-duplicated element from arrayHolder and
    * add them into the element vector????
    I did not finnish it, since I am a little bit confused, how to implement? Need some help. thanks.
    Message was edited by:
    Mellon

    Not sure if I see the use of strArray & arrayHolder (I've not looked at your code - you might use code tags next time (check the "code" button above the message textarea), but may I suggest using a Map of some sort instead of a Vector? It will prevent duplicates for you.
    Good Luck
    lee

  • Collection of Tips and Observations

    Being quite new to DPS and having just completed a 100 page brochure I wanted to share some observations and hopefully get some back.
    Some of these may not be true as there may be better ways of working that we haven't discovered yet, and some may be blatently obvious but this is what we have found.
    If you have lots of pages that make use of the same interactivity, setting this up on a master page saves a lot of time, but as you make each new page make sure you release from the master straight away otherwise elements like buttons and actions will not be linked to the right element on the page and will cause In Design to crash when uploading the article
    Using layers for different interative elements can really help organise the interacivity, but make sure all layers are active before you upload the article if you have buttons that link to an inactive layer then In Design will probably crash again
    Labelling buttons and MSO clearly saves a lot of time if you need to trouble shoot why something isnt behaving as you expect later on, In Design makes a good job of renaming duplicate buttons by adding a sequencial number, but if you have several duplicated elements on the same page naming them by their position on the page can help you when linking button actions, e.g. Image Slide Left, Image Slide Right. Having buttons with identical names can also cause crashes when uploading articles, but not always.
    Buttons inside MSO can only control elements inside the same MSO, a bit of lateral thinking (and forum help) can probably achieve the intended results
    If Video content is placed inside a frame that hides (crops) part of the video, the whole video is still shown when published (might be doing this wrong)
    Edge animations that rely on custom javascript need to be added as HTML not OAM (unless there is a way to embed the javascript into oam files?)
    anyway those are just my initial observations based on builing a publication that has a lot of identical layout product pages.

    If Video content is placed inside a frame that hides (crops) part of the video, the whole video is still shown when published (might be doing this wrong)
    You can crop the video as long as the mask is set to be an overlay object.

  • Designer 6 - Application System

    We have installed Oracle 8i as back-end on server and have also installed Repository Administration Utility with it. Than we installed Designer 6 on another PC connected to server through network. Now when I run designer with username scott (who is defined as manager in repository) the system shows a dialog box for application system. When I type any name and press 'Create' it gives an error- 'Open failed on activity' and does not create a new application system. I have tried to do this through respository object navigator also but again the same result. I ahve checked the permissions and have also reconciled the user and reconstruct the packages but nothing worked.
    Moreover, I have tried with usernames internal and system as well but they are not defined in the repository users.
    Can anybody please help?
    Thanks.
    Saleem

    I don't wish to spread doom and gloom, but the ORA-01422 message was the start of a long and miserable saga of Repository corruption and data loss for our site. It has taken me almost six months (on and off - I had other things to do) to recover about 95% of our data model, and we have lost most of the version history in the process.
    Have a look at SRs 4947235.993 and 16210050.6 on Metalink.
    I don't get onto these forums very much - too busy recovering repositories! - so I am sorry I didn't see your post earlier. I suspect that by the time you see the ORA-01422 error, it's too late to do anything about it. The Designer meta-model, unfortunately, doesn't give you all the information you need to resolve the issues on a row-by-row or element-by-element basis. The only solution I found was to delete as many of the corrupted entries as I could locate, then validate the remaining elements using the External References Utility, and then export the good bits to a clean repository.
    The ROB (Repository Object Browser) is a useful aid in this exercise, as it seems to be more resilient than the RON, and will actually show you the duplicated elements. (I'm not sure that the ROB was in Version 6 - my problems were on Version 9i.) Of course, you can't manipulate data through the ROB, and you can't access the error elements through the RON, so you need to be somewhat devious about finding ways to eliminate the duplicates, but it can be done (mostly).
    Hope this helps a bit.
    Philip

  • All photos duplicated after restoring Photoshop Elements 11 catalog

    I recently had my computer reformatted and notice that following Photoshop Elements reinstall and catalog restore all my photos have been duplicated in the Adobe/digital photos folder. I have read that this is due to my computer tech restoring all photos in the original folder structure prior to me executing the catalog restore (I should have done my research first). My question is what can I do now to eliminate the duplicates? Do I delete all photos and the Adobe folders or is there an alternative?

    Al Markunas wrote:
    The duplicates are in the same folder tree structure and, yes, the restore renamed them with a -1 suffix. The pictures with the -1 suffix are the ones I see in the Organizer.
    There is no 'smart' way to get rid of the files previously copied on your drive, but I would use the ability of the the Organizer to move folder trees on your drive.
    First I would create a new master folder outside of the old tree structure.
    Then I would work in 'Pictures' view in the left panel of PSE11.
    I would select a branch of the folder tree as a test, and drag and drop it to the new folder. Tip : there must be at least a file in that master folder to make it appear in the left panel. Then, from the Windows explorer, I would check that only the previously copied media files are showing in the moved branch... and delete the branch altogether in the Explorer.
    Once you  master the process, you can either move all your remaining folder tree from the Organizer, and delete the remaining duplicates from the Explorer or you can move branches separately.
    Be patient! Moving files requires time and you should not abort the move operation to avoid creating more duplicates.
    The main penalty of your situation is the renaming of your files with a suffix, but that does not prevent you to use 100% of the Organizer features.

  • XML import is duplicating xml elements

    I have a document which I am importing XML into to create a menu.  The xml is in this format.
    <Root>
      <Categories>
        <Category>
          <CategoryName>Black teas from around the world</CategoryName>
          <Tea>
            <TeaNumber>1</TeaNumber>
            <TeaName>Makaibari Estate Organic 1st Flush</TeaName>
            <TeaPrice>$5.50</TeaPrice>
            <Icons>
              <Organic href="file://TeanyOrganic16x16.png"/>
              <Bestseller href="file://TeanyBestSeller16x16.png"/>
              <Recommended href="file://blank.png"/>
            </Icons>
            <TeaDescription>From the oldest estate in the Darjeeling district and the first to practice Fair Trade this first flush is harvested in early spring with a slightly lighter color it is mildly flowery and  finishes with notes of Muscat grape.</TeaDescription>
          </Tea>
    </Tea>
    </Category>
      </Categories>
    </Root>
    There are several categories in the full file and each has a variable number of Tea elements.  When I import this into my document it flows nicely into the document except that it duplicates some Tea elements.  For example, the first category has 23 Tea elements in the xml file.  The second category has only 3 in the xml file.  When I  import that into InDesign the first category has its 23 elements correctly, but second category has the 3 from the xml file plus 20 other elements which are duplicates of my original reference(the one I used to build the document prior to importing the xml file) Tea item.  In fact, every category has been padded with extra duplicates of that same reference Tea element such that each category has 23 Tea elements regardless of what the actual XML file has.
    Anyone know why it is duplicating those elements?

    Reposting.
    I have a document which I am importing XML into to create a menu.  The xml is in this format.
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Root>
        <Categories>   
            <Category>
                <CategoryName>Black teas from around the world</CategoryName>
                <Tea>
                    <TeaNumber>1</TeaNumber>
                    <TeaName>Makaibari Estate Organic 1st Flush</TeaName>
                    <TeaPrice>$5.50</TeaPrice>
                    <Icons>
                        <Organic href="file:///C:/Users/Michael/Documents/Caraway%20Tea%20Company/information/business%20coorespondence/Teany/TeanyOrganic16x16.png"></Organic>
                        <Bestseller href="file:///C:/Users/Michael/Documents/Caraway%20Tea%20Company/information/business%20coorespondence/Teany/TeanyBestSeller16x16.png"></Bestseller>
                        <Recommended href="file:///C:/Users/Michael/Documents/Caraway%20Tea%20Company/information/business%20coorespondence/Teany/blank.png"></Recommended>
                    </Icons>
                    <TeaDescription>From the oldest estate in the Darjeeling district and the first to practice Fair Trade this first flush is harvested in early spring with a slightly lighter color it is mildly flowery and  finishes with notes of Muscat grape.</TeaDescription>
                </Tea>
            </Category>
        </Categories>
    </Root>
    There are several categories in the full file and each has a variable number of Tea elements.  When I import this into my document it flows nicely into the document except that it duplicates some Tea elements.  For example, the first category has 23 Tea elements in the xml file.  The second category has only 3 in the xml file.  When I  import that into InDesign the first category has its 23 elements correctly, but second category has the 3 from the xml file plus 20 other elements which are duplicates of my original reference(the one I used to build the document prior to importing the xml file) Tea item.  In fact, every category has been padded with extra duplicates of that same reference Tea element such that each category has 23 Tea elements regardless of what the actual XML file has.
    Anyone know why it is duplicating those elements?

  • After duplicating LAYER, I go to EDIT    FILL LAYER and can't find NORMAL mode  Elements 9

    after duplicating LAYER, I go to EDIT    FILL LAYER and can't find NORMAL mode

    I go to the menu and NORMAL does not appear
    Date: Mon, 14 Jan 2013 10:28:01 -0700
    From: [email protected]
    To: [email protected]
    Subject: after duplicating LAYER, I go to EDIT    FILL LAYER and can't find NORMAL mode  Elements 9
        Re: after duplicating LAYER, I go to EDIT    FILL LAYER and can't find NORMAL mode  Elements 9
        created by 99jon in Photoshop Elements - View the full discussion
      Try from the layers pallet after highlighting your background copy layer. You should have dropdown menus for blend modes and opacity.
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/4992506#4992506
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4992506#4992506
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4992506#4992506. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Photoshop Elements by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

Maybe you are looking for

  • How to tell if my phone is locked or not by the ca...

     I bought this lumia 920, there are the service carrier apps installed as default. I want to know if it is locked by the carrier so that I can use other carrier's SIM card. Phone information: OS version:8.0.9903.10 Firmware revision number :1232.2109

  • MacBook Pro Not Accepting Time Machine Restore

    I'm officially stumped. Let me explain... In preparation for upgrading OS 10.9.5 to Yosemite, I completed a full backup of my MacBook Pro, purchased in August 2010. The following morning, (I'd not yet upgraded to Yosemite), I noticed that the Drive P

  • Date and time for background job

    Hi, I am creating a program with out selection screen . This program runs based on date and time . so I need to create a table with date and time fileds. Program runs based on FROM DATE FROM TIME  TO DATE  TO TIME....... FROM DATE and FROM TIME  will

  • Testing XSLT in WPC

    I'm wondering what methods folks are using when they are testing out XSLT changes.  It appears as though one must bounce the portal in order for XSLT changes to take affect. Is there an easier way to have a change to the XSLT for a document type take

  • Language Change English to Chiness

    Hi, i have change language of my application From English to Chiness and Hindi. now when i run application then that show me ?? etc i have Follow that Link http://darekj.blogspot.com/2006/06/translation-in-apex-mini-how-to.html how to resolve that pr