4 Replies Latest reply: Jun 3, 2010 1:49 AM by BluShadow RSS

    Insert statements to load into a table from a file

    708264
      I have 200-300 insert statements in one excel/.dat file. Can I write one procedure to load these ine one run: Below are the sample statements.

      INSERT INTO SIS_LOCATION_MONTH(REPORTDATE,LOCATION_ID,YEAR) VALUES (TO_DATE('     3/1/2010     ','MM/DD/YYYY'),     1107     ,     2010     );
      INSERT INTO SIS_LOCATION_MONTH(REPORTDATE,LOCATION_ID,YEAR) VALUES (TO_DATE('     3/1/2010     ','MM/DD/YYYY'),     1106     ,     2010     );
      INSERT INTO SIS_LOCATION_MONTH(REPORTDATE,LOCATION_ID,YEAR) VALUES (TO_DATE('     3/1/2010     ','MM/DD/YYYY'),     1105     ,     2010     );
      INSERT INTO SIS_LOCATION_MONTH(REPORTDATE,LOCATION_ID,YEAR) VALUES (TO_DATE('     3/1/2010     ','MM/DD/YYYY'),     1104     ,     2010     );
      INSERT INTO SIS_LOCATION_MONTH(REPORTDATE,LOCATION_ID,YEAR) VALUES (TO_DATE('     3/1/2010     ','MM/DD/YYYY'),     1103     ,     2010     );
      INSERT INTO SIS_LOCATION_MONTH(REPORTDATE,LOCATION_ID,YEAR) VALUES (TO_DATE('     3/1/2010     ','MM/DD/YYYY'),     1102     ,     2010     );
      INSERT INTO SIS_LOCATION_MONTH(REPORTDATE,LOCATION_ID,YEAR) VALUES (TO_DATE('     3/1/2010     ','MM/DD/YYYY'),     1101     ,     2010     );
      INSERT INTO SIS_LOCATION_MONTH(REPORTDATE,LOCATION_ID,YEAR) VALUES (TO_DATE('     3/1/2010     ','MM/DD/YYYY'),     1100     ,     2010     );
      INSERT INTO SIS_LOCATION_MONTH(REPORTDATE,LOCATION_ID,YEAR) VALUES (TO_DATE('     3/1/2010     ','MM/DD/YYYY'),     1099     ,     2010     );
      INSERT INTO SIS_LOCATION_MONTH(REPORTDATE,LOCATION_ID,YEAR) VALUES (TO_DATE('     3/1/2010     ','MM/DD/YYYY'),     1098     ,     2010     );
      INSERT INTO SIS_LOCATION_MONTH(REPORTDATE,LOCATION_ID,YEAR) VALUES (TO_DATE('     3/1/2010     ','MM/DD/YYYY'),     1097     ,     2010     );


      Please help!