Link to home
Start Free TrialLog in
Avatar of Westside2004
Westside2004Flag for United States of America

asked on

Easy way to Load Data into tables?

Hi..

I wanted to know if someone can tell me the easiest way to load data into newly created tables.

Certain tables like "States", "Countries" i need to constantly reload and reload each time I create my databases.

I have maybe 10-20 tables that should have "canned" data in them when the tables are created.  I would like to have just one script that I can run that will populate the tables.

I suppose DTS could do something like this, but I was looking to have it all in one .sql file.

thx

-ws
Avatar of rafrancisco
rafrancisco

One option that you can do is to create your "canned" tables in the model database.  Once it is there, everytime you create your database, it will automatically be created in your new database.  You don't have to create any script to do this because SQL Server will do it for you.

Hope this helps.
ASKER CERTIFIED SOLUTION
Avatar of rafrancisco
rafrancisco

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial