killerguy2003
Programmer
I am a newbie to the oracle scene. I am trying to split a flat file and load into multiple tables. I know this can be done using a cursor and read each row and split the data based on the first column and load into different tables. But I am not sure where to start. This is what I am trying to accomplish, if the row starts with UserArray(1st column) then it should be inserted into USER Table and if the row starts with ContactArray(1st column) then it should be inserted into CONTACT table. I would really appreciate if anybody can shed some light on this.
Here is how my data looks seperated by a single pipe '|'
UserArray1|TESTUSER|OWNER|TEST@TEST.com|7195355353|123|TEST|T|Miachel|7195355353|
ContactArray1|DAR|test@hotmail.com|91565656577788787|111|doe||John|91565656577788787|
UserArray2|TESTUSER|OWNER|TEST@TEST.com|7195355353|123|TEST|T|Miachel|7195355353|
UserArray3|TESTUSER|OWNER|TEST@TEST.com|7195355353|123|TEST|T|Miachel|7195355353|
ContactArray2|CompanyName|test@hotmail.com|0001987123456|789|doe||John|0001987123456|
ContactArray3|DAR|test@hotmail.com|91565656577788787|111|doe||John|91565656577788787|
Thanks!
KG
Here is how my data looks seperated by a single pipe '|'
UserArray1|TESTUSER|OWNER|TEST@TEST.com|7195355353|123|TEST|T|Miachel|7195355353|
ContactArray1|DAR|test@hotmail.com|91565656577788787|111|doe||John|91565656577788787|
UserArray2|TESTUSER|OWNER|TEST@TEST.com|7195355353|123|TEST|T|Miachel|7195355353|
UserArray3|TESTUSER|OWNER|TEST@TEST.com|7195355353|123|TEST|T|Miachel|7195355353|
ContactArray2|CompanyName|test@hotmail.com|0001987123456|789|doe||John|0001987123456|
ContactArray3|DAR|test@hotmail.com|91565656577788787|111|doe||John|91565656577788787|
Thanks!
KG