Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Copying data from one table to 50 different table.
Old 03-11-2006, 02:13 PM Copying data from one table to 50 different table.
Novice Talker

Posts: 5
Trades: 0
Hi, I want to copy some data from one table (say from db1) to 50 different tables depend on state name of first table (db1). Can I do it in one sql statement? I mean reading the “state” column from db1 and then inserting into different table depending on the state name. ? If its possible could you please give a hint. If not, then what is the best way to do it? Thank you.
arya is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-11-2006, 02:54 PM Re: Copying data from one table to 50 different table.
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
cannot see why you would want to create redundant data in many tables this way, but it could be done depending on the database server and if it supported stored procedures.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-11-2006, 03:15 PM Re: Copying data from one table to 50 different table.
Novice Talker

Posts: 5
Trades: 0
Well, its not really redundant data, because different tables store the data for different states. Well, I know it can be done using one table and initially I was surprised why 50 different table was created but then I was told, it help reduce search time. By the way, it’s a shared server and I only have access to myphpadmin. So, Can I do this?

By the way, i am using mysql 4.0.16, so it doesn't support stored procedures.

Last edited by arya; 03-11-2006 at 03:19 PM..
arya is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Copying data from one table to 50 different table.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.58383 seconds with 12 queries