I have the following table in oracle 9i:
arc_book
----------------------------------------------------------------------------------------------
arc_id, arc_title, arc_publisher, arc_release_date
And a tab delimited file called smc_book. Here is how the smc_book tab delimited file looks like:
smc_id smc_title smc_publisher smc_release_date
---------------------------------------------------------------------------------------------------------------------------------------------
1234 "Beautiful Wonder" "Wrox Books" 1/1/1999
2356 "Master PL/SQL" "OReilly Media" 6/5/2004
5432 "Harry Potter and Goblet of Fire" "Simon & Shuster" 2/4/2001
What I want to do is create a lookup table where I matchup the records that are the same book in the smc_book file and arc_book table.
So the lookup table would look like:
lookup
-------------------------------------------------
smc_id, arc_id, arc_title, arc_publisher
When I read in the smc_book file I don't want to re-add books that have already been added to the lookup table.
Also when I am matching up the books in the smc_book file and arc table I want to make sure it gets all similar book titles that have the same publisher and release date because the book title, publisher are not exactly the same in both table. For example with data:
smc_book file:
smc_id smc_title smc_publisher smc_release_date
---------------------------------------------------------------------------------------------------------------------------------------------
1234 "Beautiful Wonder" "Wrox Books" 1/1/1999
2356 "Master PL/SQL" "OReilly Media" 6/5/2004
5432 "Harry Potter and Goblet of Fire" "Simon & Shuster" 2/4/2001
arc_book table:
arc_id arc_title arc_publisher arc_release_date
---------------------------------------------------------------------------------------------------------------------------------------------
1245 "Wonder, Beautiful" "Wrox" 1/1/1999
1244 "The PL-SQL, Master" "Media, OReilly" 6/5/2004
4352 "Golbet of Fire, Harry Potter" "Simon and Shuster" 2/4/2001
So I want to match up "Beautiful Wonder" in the smc_book file with "Wonder, Beautiful" in the arc_book table even though the title and publisher data is not exact.
Could someone please give an example of reading a tab delimted file in oracle and also how to match up "Beautiful Wonder" in the smc_book file with "Wonder, Beautiful" in the arc_book table even though the title and publisher data is not exact.
Thanks
arc_book
----------------------------------------------------------------------------------------------
arc_id, arc_title, arc_publisher, arc_release_date
And a tab delimited file called smc_book. Here is how the smc_book tab delimited file looks like:
smc_id smc_title smc_publisher smc_release_date
---------------------------------------------------------------------------------------------------------------------------------------------
1234 "Beautiful Wonder" "Wrox Books" 1/1/1999
2356 "Master PL/SQL" "OReilly Media" 6/5/2004
5432 "Harry Potter and Goblet of Fire" "Simon & Shuster" 2/4/2001
What I want to do is create a lookup table where I matchup the records that are the same book in the smc_book file and arc_book table.
So the lookup table would look like:
lookup
-------------------------------------------------
smc_id, arc_id, arc_title, arc_publisher
When I read in the smc_book file I don't want to re-add books that have already been added to the lookup table.
Also when I am matching up the books in the smc_book file and arc table I want to make sure it gets all similar book titles that have the same publisher and release date because the book title, publisher are not exactly the same in both table. For example with data:
smc_book file:
smc_id smc_title smc_publisher smc_release_date
---------------------------------------------------------------------------------------------------------------------------------------------
1234 "Beautiful Wonder" "Wrox Books" 1/1/1999
2356 "Master PL/SQL" "OReilly Media" 6/5/2004
5432 "Harry Potter and Goblet of Fire" "Simon & Shuster" 2/4/2001
arc_book table:
arc_id arc_title arc_publisher arc_release_date
---------------------------------------------------------------------------------------------------------------------------------------------
1245 "Wonder, Beautiful" "Wrox" 1/1/1999
1244 "The PL-SQL, Master" "Media, OReilly" 6/5/2004
4352 "Golbet of Fire, Harry Potter" "Simon and Shuster" 2/4/2001
So I want to match up "Beautiful Wonder" in the smc_book file with "Wonder, Beautiful" in the arc_book table even though the title and publisher data is not exact.
Could someone please give an example of reading a tab delimted file in oracle and also how to match up "Beautiful Wonder" in the smc_book file with "Wonder, Beautiful" in the arc_book table even though the title and publisher data is not exact.
Thanks