Humble Trader

Monday, September 25, 2006

Country Dimension - o_countries_t.sql

-- ------------------------------------------------------------------------- --
-- --
-- Title: o_countries_t.sql --
-- Author: Steve Roach --
-- Date: 26-SEP-2006 --
-- Version: 01.00 --
-- --
-- Description: Create table ODS.O_COUNTRIES. --
-- --
-- History: --
-- --
-- Date Ver Author Description --
-- --------- ----- ------ -------------------------------------------------- --
-- 26-SEP-06 01.00 SRR First release --
-- --
-- ------------------------------------------------------------------------- --

DROP TABLE o_countries CASCADE CONSTRAINTS
/

CREATE TABLE o_countries
(
name VARCHAR2(100) NOT NULL
,iso2_code VARCHAR2(2) NULL
,iso3_code VARCHAR2(3) NULL
,un3_number VARCHAR2(3) NULL
,start_date DATE NOT NULL
,end_date DATE NOT NULL
,run_no NUMBER NOT NULL
,ins_tsp DATE NOT NULL
)
/

COMMENT ON TABLE o_countries IS 'Names of countries and their various codes
as defined by the ISO.'
/

COMMENT ON COLUMN o_countries.name IS 'Full name of the country.'
/

COMMENT ON COLUMN o_countries.iso2_code IS '2 character ISO code.'
/

COMMENT ON COLUMN o_countries.iso3_code IS '3 character ISO code.'
/

COMMENT ON COLUMN o_countries.un2_number IS '3 digit numeric UN code.'
/

COMMENT ON COLUMN o_countries.start_date IS 'Date that the Country came into
being.'
/

COMMENT ON COLUMN o_countries.end_date IS 'Date that the Country ceased.'
/

COMMENT ON COLUMN o_countries.run_no IS 'The Run Number that created this
row.'
/

COMMENT ON COLUMN o_countries.ins_tsp IS 'Insert timestamp.'
/

0 Comments:

Post a Comment

<< Home