I have to populate a new table from an old one: the problem is the new columns table do not have the same name than the old one. for example the new table is
iNSERT INTO BILL_TABLE (budget_no, VERSION, FISCAL_YEAR
BILL_SEQ_NO
RATE_01
RATE_02
RATE_03 (UNTIL RATE_12)
SQUARE_FT_01
SQUARE_FT_02
SQUARE_FT_03 (UNTIL SQUARE_FT_12)
TOTAL_01
TOTAL_02
TOTAL_03
COMMENTS_01
COMMENTS_02
COMMENTS_03
select(
REPORTING_YEAR VERSION
EFFECTIVE_DATE, SPACE_TYPE
SQ_FT
RATE AMOUNT budget_no
COMMENTS ) FROM OLD TABLE
The problem I am facing is that the old table column has EFFECTIVE DATE (datatype date) WHICH CAN CORRESPOND TO RATE_01 (datatype number) IF I CAN WRITE A WHERE CLAUSE SAYING THAT WHERE RATE_01 for the EFFECTIVE_DATE= 01-JAN-2000 TO 31-JAN-2000 AND FOR RATE _02 I WILL HAVE 1-FEV-200O TO FEB-2001.... the
SQUARE_FT_01 colum has to correspond to SQ_FT in the second table and here also by month.... could you please help me with this. Do I have to write one first insert statement and update after fort the other column. How can I write the first insert statement. Tahnk you very much in advance
iNSERT INTO BILL_TABLE (budget_no, VERSION, FISCAL_YEAR
BILL_SEQ_NO
RATE_01
RATE_02
RATE_03 (UNTIL RATE_12)
SQUARE_FT_01
SQUARE_FT_02
SQUARE_FT_03 (UNTIL SQUARE_FT_12)
TOTAL_01
TOTAL_02
TOTAL_03
COMMENTS_01
COMMENTS_02
COMMENTS_03
select(
REPORTING_YEAR VERSION
EFFECTIVE_DATE, SPACE_TYPE
SQ_FT
RATE AMOUNT budget_no
COMMENTS ) FROM OLD TABLE
The problem I am facing is that the old table column has EFFECTIVE DATE (datatype date) WHICH CAN CORRESPOND TO RATE_01 (datatype number) IF I CAN WRITE A WHERE CLAUSE SAYING THAT WHERE RATE_01 for the EFFECTIVE_DATE= 01-JAN-2000 TO 31-JAN-2000 AND FOR RATE _02 I WILL HAVE 1-FEV-200O TO FEB-2001.... the
SQUARE_FT_01 colum has to correspond to SQ_FT in the second table and here also by month.... could you please help me with this. Do I have to write one first insert statement and update after fort the other column. How can I write the first insert statement. Tahnk you very much in advance