SQL Developement Issue
641495May 27 2008 — edited May 27 2008I have 2 csv data.
i) Account
ii) Contact
Account csv:
Account Name Account Addr Account City
-----------------------------------------------------------------------------------
24 Hour Fitness 3M Center Saint Paul
24 Hour Fitness 3M Center Saint Paul
21st Century 6301 Owensmouth Ave Wooland Hills
21st Century 6301 Owensmouth Ave Wooland Hills
21st Century 6301 Owensmouth Ave Wooland Hills
Abbott 100 Abbott Park Rd Abbott Park
Contact csv:
First Name Last Name Account Name
--------------------------------------------------------------------------
Ian Isaac 21st Century
Marlis Kerby 21st Century
Sean Smith 24 Hour Fitness
Nancy Berce Abbott
George Bennett Abbott
I imported 2 csv in separate tables like as STG_ACCOUNT, STG_CONTACT.
Now i avoided duplicates using SQL queries separately. Finally the two table becomes,
STG_ACCOUNT:
Row_Id Account Name Account Addr Account City
-------------------------------------------------------------------------------------------------
A00 24 Hour Fitness 3M Center Saint Paul
A01 21st Century 6301 Owensmouth Ave Wooland Hills
A02 Abbott 100 Abbott Park Rd Abbott Park
STG_CONTACT:
Row_Id First Name Last Name Account Name Par_Row_Id
----------------------------------------------------------------------------------------------------------
B00 Ian Isaac 21st Century A01
B01 Marlis Kerby 21st Century A01
B02 Sean Smith 24 Hour Fitness A00
B03 Nancy Berce Abbott A02
B04 George Bennett Abbott A02
Finally i got the result successfully but in production side they asked this output using PL/SQL.If anybody know PL/SQL procedure help me?
Thanks,
Vadivu