CREATE TABLE trafodion.invent.partloc
( loc_code    CHARACTER (3)        NO DEFAULT NOT NULL
, partnum     NUMERIC (4) UNSIGNED NO DEFAULT NOT NULL
, qty_on_hand NUMERIC (7)          DEFAULT 0  NOT NULL
, PRIMARY KEY ( loc_code, partnum )
) ;

INSERT INTO trafodion.invent.partloc VALUES
  ( 'A10', 2001,  800 )
, ( 'A21',  255,   21 )
, ( 'A34', 6201,    0 )
, ( 'A35', 6301,    0 )
, ( 'A36', 6400,   34 )
, ( 'A66', 6603,  300 )
, ( 'A67', 6401,  454 )
, ( 'A78',  244,   43 )
, ( 'A78', 5505,  100 )
, ( 'A87',  212,   18 )
, ( 'A88', 2403,  735 )
, ( 'A88', 5504,   30 )
, ( 'A94', 3205,  200 )
, ( 'A98', 5110,  510 )
, ( 'G11', 2002,   20 )
, ( 'G34', 6201,  106 )
, ( 'G35', 6301,  331 )
, ( 'G36', 6400, 1034 )
, ( 'G43', 5100,   77 )
, ( 'G45', 4102,   69 )
, ( 'G65', 3201,   36 )
, ( 'G68', 6500, 1132 )
, ( 'G76', 2405,   42 )
, ( 'G76', 7301,   32 )
, ( 'G78', 5505,    0 )
, ( 'G87',  212,   20 )
, ( 'G87', 3103,    0 )
, ( 'G87', 3210,   44 )
, ( 'G87', 2402,    0 )
, ( 'G88', 2403,   32 )
, ( 'G88', 5504,    0 )
, ( 'G89', 5101,   86 )
, ( 'G94', 3205,   59 )
, ( 'G98', 5103,   28 )
, ( 'G98', 5110,  136 )
, ( 'P10', 2001,    0 )
, ( 'P12', 2002,  200 )
, ( 'P12', 2003,    0 )
, ( 'P15', 2003,  200 )
, ( 'P66', 6603,   40 )
, ( 'P67', 6401,   54 )
, ( 'P68', 6500,    0 )
, ( 'P76', 7102,  200 )
, ( 'P78',  244,   23 )
, ( 'P87', 3103,  300 )
;

UPDATE STATISTICS FOR TABLE trafodion.invent.partloc ON EVERY COLUMN ;
