
-- Run with use DB for columns and with use R for rows

log_enable (2);

INSERT 
     INTO  l_partkey 
   SELECT  l_orderkey, l_linenumber, l_partkey 
     FROM  db..lineitem
;
INSERT 
     INTO  l_suppkey
   SELECT  l_orderkey, l_linenumber, l_suppkey 
     FROM  db..lineitem
;
INSERT 
     INTO  l_extendedprice
   SELECT  l_orderkey, l_linenumber, l_extendedprice 
     FROM  db..lineitem
;
INSERT 
     INTO  l_discount
   SELECT  l_orderkey, l_linenumber, l_discount 
     FROM  db..lineitem
;
INSERT 
     INTO  l_quantity 
   SELECT  l_orderkey, l_linenumber, l_quantity 
     FROM  db..lineitem
;

INSERT 
     INTO  ps_supplycost
   SELECT  ps_partkey, ps_suppkey, ps_supplycost 
     FROM  db..partsupp
;

INSERT 
     INTO  o_orderdate
   SELECT  o_orderkey, o_orderdate 
    FROM   db..orders
;

INSERT 
     INTO  s_nationkey
   SELECT  s_suppkey, s_nationkey 
     FROM  db..supplier
;

INSERT 
     INTO  p_name
   SELECT  p_partkey, p_name 
     FROM  db..part
;

