but how do i get the data from the file. Should I use utl_file package and load the data before using the INSERT ... ? I feel this will be slow.
Is there a simple way (like a single BULK INSERT in SQL Server) to do that.. looks like the "LOAD DATA .." stuff can be executed only from SQLLDR. I want the same to be executed from within a procedure !
Depending on which version of Oracle you have you can use External tables. From what I understand you can then define an external table, say table_2, which consists of data in a text file outside of oracle, but you can execute SELECT-on it.
I've not worked with them, but I guess in your case they could be useful, and my example would work for you.
Check documentation on External tables for your Oracle version.