Environment: Oracle database, HPUX
Description: Sample SQL script to modify database table and to add database documentation. This script would be used on test instance, then ultimately be used to make changes in production.
Code Listing:
rem $Author: roblaw $
rem $Locker: roblaw $
rem $Date: 1996/06/26 00:00:47 $
rem $Source: /appl/jit/RCS/ddl/table_b/alt_backlog_header.sql [bld_alt.sql]
rem $Revision: 1.1 $
set echo on
/*
06/25/96 roblaw schedule_build_header.release_flag to see if in process
*/
alter table backlog_header add (
release_flag varchar2(1),
GROSS_ORD_VALUE NUMBER(13,2)
);
COMMENT ON COLUMN BACKLOG_HEADER.RELEASE_FLAG IS
'Is SO scheduled and released to production?
null = not scheduled and thus not released
N = scheduled, but not released
Y = scheduled and released';
/*
01/02/97 roblaw: new columns for final assembly scheduling
*/
alter table backlog_header add (
week_before NUMERIC(2),
week_order NUMERIC(3,1),
item_excep VARCHAR2(1),
finish_qty NUMERIC(15,5),
finish_multi VARCHAR2(5),
finish_excep VARCHAR2(1),
strap_qty NUMERIC(15,5),
strap_multi VARCHAR2(5),
strap_excep VARCHAR2(1),
fabric_qty NUMERIC(15,5),
fabric_multi VARCHAR2(5),
fabric_excep VARCHAR2(1));
COMMENT ON COLUMN BACKLOG_HEADER.week_before IS
'Week number using not_before_date, sunday logic same as week_num.';
COMMENT ON COLUMN BACKLOG_HEADER.week_order IS
'Number of weeks old from order_date, value range 0-100.';
COMMENT ON COLUMN BACKLOG_HEADER.item_excep IS
'Value based on sum of backlog_detail.item_excep
= * if any value is *
= null, if all values are null';
COMMENT ON COLUMN BACKLOG_HEADER.finish_qty IS
'Sum of backlog_detail.finish_qty';
COMMENT ON COLUMN BACKLOG_HEADER.finish_multi IS
'Value is set based on all SO line items, where backlog_detail.finish_1 has
= null, if all values are null
= color, if only one color
= MULTI, if more than one color';
COMMENT ON COLUMN BACKLOG_HEADER.finish_excep IS
'Value based on sum of backlog_detail.finish_excep
= * if any value is *
= null, if all values are null';
COMMENT ON COLUMN BACKLOG_HEADER.strap_qty IS
'Sum of backlog_detail.strap_qty';
COMMENT ON COLUMN BACKLOG_HEADER.strap_multi IS
'Value is set based on all SO line items, where backlog_detail.strap_1
and backlog_detail.strap_2 has
= null, if all values are null
= color, if only one color
= MULTI, if more than one color';
COMMENT ON COLUMN BACKLOG_HEADER.strap_excep IS
'Value based on sum of backlog_detail.strap_excep
= * if any value is *
= null, if all values are null';
COMMENT ON COLUMN BACKLOG_HEADER.fabric_qty IS
'sum of backlog_detail.fabric_qty';
COMMENT ON COLUMN BACKLOG_HEADER.fabric_multi IS
'Value is set based on all SO line items, where backlog_detail.fabric_1
and backlog_detail.fabric_2 has
= null, if all values are null
= color, if only one color
= MULTI, if more than one color';
COMMENT ON COLUMN BACKLOG_HEADER.fabric_excep IS
'Value based on sum of backlog_detail.fabric_excep
= * if any value is *
= null, if all values are null';
No comments:
Post a Comment