0

Hi All.

I have a very large single-table database of articles that I want to convert to a multi-table, relational database.

The existing single-table database contains fields for article author, article source, and article category, where several 'author', 'source', and 'category' IDs repeat dozens of times for hundreds of different articles.

I want to create seperate tables for author, source, and category and populate the new tables by extracting data from the original single-table database by unique ID field.

I figured out how to use INSERT and SELECT to pull data in new tables, but can't figure out how to pull only a single instance of a unique author, source, and category to create master reference tables for author/source/category.

Any assistance would be much appreciated.

Thanks in advance.

L.B.
lbfrank@envoyoffice.com

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by sn4rf3r
0

without more information I can olny guess...

insert into authors (col1, col2,col3) values (select author,col2,col3 from big_table group by author)

is that what you are looking for?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.