--TD20591.10 (received from HVH)

insert into DWH_STRING (DWH_STRING_ID, FACTORYDESCRIPTION, MAXSTRINGLENGTH, DIMENSION_TABLE, DIMENSION_COLUMN, SYSTEMUSER_ID, TIMESTAMP)
values (651, 'Generated from Wearer Inventory', 40, 'Work Order', 'Origin', 1, sysdate);
insert into DWH_STRING (DWH_STRING_ID, FACTORYDESCRIPTION, MAXSTRINGLENGTH, DIMENSION_TABLE, DIMENSION_COLUMN, SYSTEMUSER_ID, TIMESTAMP)
values (652, 'Created Manually ', 40, 'Work Order', 'Origin', 1, sysdate);
insert into DWH_STRING (DWH_STRING_ID, FACTORYDESCRIPTION, MAXSTRINGLENGTH, DIMENSION_TABLE, DIMENSION_COLUMN, SYSTEMUSER_ID, TIMESTAMP)
values (653, 'Created by Web Portal', 40, 'Work Order', 'Origin', 1, sysdate);
insert into DWH_STRING (DWH_STRING_ID, FACTORYDESCRIPTION, MAXSTRINGLENGTH, DIMENSION_TABLE, DIMENSION_COLUMN, SYSTEMUSER_ID, TIMESTAMP)
values (654, 'Created by Route Assistant', 40, 'Work Order', 'Origin', 1, sysdate);
insert into DWH_STRING (DWH_STRING_ID, FACTORYDESCRIPTION, MAXSTRINGLENGTH, DIMENSION_TABLE, DIMENSION_COLUMN, SYSTEMUSER_ID, TIMESTAMP)
values (655, 'Converted', 40, 'Work Order', 'Origin', 1, sysdate);
insert into DWH_STRING (DWH_STRING_ID, FACTORYDESCRIPTION, MAXSTRINGLENGTH, DIMENSION_TABLE, DIMENSION_COLUMN, SYSTEMUSER_ID, TIMESTAMP)
values (656, 'Sales Note', 40, 'Work Order', 'Type', 1, sysdate);
insert into DWH_STRING (DWH_STRING_ID, FACTORYDESCRIPTION, MAXSTRINGLENGTH, DIMENSION_TABLE, DIMENSION_COLUMN, SYSTEMUSER_ID, TIMESTAMP)
values (657, 'Credit Note', 40, 'Work Order', 'Type', 1, sysdate);
insert into DWH_STRING (DWH_STRING_ID, FACTORYDESCRIPTION, MAXSTRINGLENGTH, DIMENSION_TABLE, DIMENSION_COLUMN, SYSTEMUSER_ID, TIMESTAMP)
values (658, 'Internal Purchase Order', 40, 'Work Order', 'Type', 1, sysdate);
insert into DWH_STRING (DWH_STRING_ID, FACTORYDESCRIPTION, MAXSTRINGLENGTH, DIMENSION_TABLE, DIMENSION_COLUMN, SYSTEMUSER_ID, TIMESTAMP)
values (659, 'Stock Delivery Order', 40, 'Work Order', 'Type', 1, sysdate);
insert into DWH_STRING (DWH_STRING_ID, FACTORYDESCRIPTION, MAXSTRINGLENGTH, DIMENSION_TABLE, DIMENSION_COLUMN, SYSTEMUSER_ID, TIMESTAMP)
values (660, 'Mounting Order', 40, 'Work Order', 'Type', 1, sysdate);
insert into DWH_STRING (DWH_STRING_ID, FACTORYDESCRIPTION, MAXSTRINGLENGTH, DIMENSION_TABLE, DIMENSION_COLUMN, SYSTEMUSER_ID, TIMESTAMP)
values (661, 'Dismounting Order', 40, 'Work Order', 'Type', 1, sysdate);
insert into DWH_STRING (DWH_STRING_ID, FACTORYDESCRIPTION, MAXSTRINGLENGTH, DIMENSION_TABLE, DIMENSION_COLUMN, SYSTEMUSER_ID, TIMESTAMP)
values (662, 'Work Order for Personalized Garments', 40, 'Work Order', 'Type', 1, sysdate);
insert into DWH_STRING (DWH_STRING_ID, FACTORYDESCRIPTION, MAXSTRINGLENGTH, DIMENSION_TABLE, DIMENSION_COLUMN, SYSTEMUSER_ID, TIMESTAMP)
values (663, 'Work Order for General Use Pool Items', 40, 'Work Order', 'Type', 1, sysdate);
insert into DWH_STRING (DWH_STRING_ID, FACTORYDESCRIPTION, MAXSTRINGLENGTH, DIMENSION_TABLE, DIMENSION_COLUMN, SYSTEMUSER_ID, TIMESTAMP)
values (664, 'Work Order for Customer Related Pool', 40, 'Work Order', 'Type', 1, sysdate);
commit;

insert into DWH_SETTINGSPERTABLE
           (TABLENAME, ISFACTYN, LOADYN, SYSTEMUSER_ID, TIMESTAMP, SOURCESYSTEM)
  select 'WORK_ORDERS', 'Y', 'Y', 1, sysdate, 0
    from dual
   where not exists (select 1
                       from DWH_SETTINGSPERTABLE h
                      where h.tablename = 'WORK_ORDERS');
commit;
insert into DWH_SETTINGSPERTABLE
           (TABLENAME, ISFACTYN, LOADYN, SYSTEMUSER_ID, TIMESTAMP, SOURCESYSTEM)
  select 'GL_SEGMENT', 'N', 'N', 1, sysdate, 2
    from dual
   where not exists (select 1
                       from DWH_SETTINGSPERTABLE h
                      where h.tablename = 'GL_SEGMENT');
commit;
insert into DWH_SETTINGSPERTABLE
           (TABLENAME, ISFACTYN, LOADYN, SYSTEMUSER_ID, TIMESTAMP, SOURCESYSTEM)
  select 'FINANCIAL_TRANSACTION', 'Y', 'N', 1, sysdate, 2
    from dual
   where not exists (select 1
                       from DWH_SETTINGSPERTABLE h
                      where h.tablename = 'FINANCIAL_TRANSACTION');
commit;
insert into DWH_SETTINGSPERTABLE
           (TABLENAME, ISFACTYN, LOADYN, SYSTEMUSER_ID, TIMESTAMP, SOURCESYSTEM)
  select 'WORK_ORDER_DIM', 'N', 'Y', 1, sysdate, 0
    from dual
   where not exists (select 1
                       from DWH_SETTINGSPERTABLE h
                      where h.tablename = 'WORK_ORDER_DIM');
commit;