import data

import data

am 03.05.2007 05:45:42 von King of Red Lions

I'm basically a database noob hoping to find a shortcut if at all possible.

I've created an ER diagram for a site I plan to build and have used that to
create the database in MS SQL 2000.

Now I want to import various data from (basically) excel spreadsheets (for
example, company names from a different sql dbase, addresses from excel and
phone numbers from a csv file) into the new database.

I have tried various methods outlined on web sites (including DTS) and have
learned I need to go back and create default values for essentially every
non-null field if I am to update literally any linked table.

My question is this: Is there any easy way/program via which I can import
the data to two different tables -- i.e. address into one table and
corresponding city into another table -- and have the relationship(s)
continue?

Or alternatively is there a "better/easy" way to do it inside sql once I
import the entire data into it's own single table?



Not to belabor the point (versus to more fully explain), but say I have two
data sets

[ Company Name | Address ]

and

[ Company Name | Phone ]

and I want to import them both into a database with separate three tables:

1. Company Name
2. Address
3. Phone

What is the least labour intensive way to effect this??

Thanks in advance

Re: import data

am 03.05.2007 05:59:29 von King of Red Lions

Also, (though it is the same issue essentially) what if the first
dataset is Company Name, Address, City where each different city is
listed from 1 to ? number of times -- is there a way the dbase can
know that say New York only needs to be added once to a City table and
then the other tables just have a reference to that ID in the city
table?

"Mark S" wrote in message
news:GVc_h.156992$aG1.70770@pd7urf3no...
> I'm basically a database noob hoping to find a shortcut if at all
> possible.
>
> I've created an ER diagram for a site I plan to build and have used that
> to create the database in MS SQL 2000.
>
> Now I want to import various data from (basically) excel spreadsheets (for
> example, company names from a different sql dbase, addresses from excel
> and phone numbers from a csv file) into the new database.
>
> I have tried various methods outlined on web sites (including DTS) and
> have learned I need to go back and create default values for essentially
> every non-null field if I am to update literally any linked table.
>
> My question is this: Is there any easy way/program via which I can import
> the data to two different tables -- i.e. address into one table and
> corresponding city into another table -- and have the relationship(s)
> continue?
>
> Or alternatively is there a "better/easy" way to do it inside sql once I
> import the entire data into it's own single table?
>
>
>
> Not to belabor the point (versus to more fully explain), but say I have
> two data sets
>
> [ Company Name | Address ]
>
> and
>
> [ Company Name | Phone ]
>
> and I want to import them both into a database with separate three tables:
>
> 1. Company Name
> 2. Address
> 3. Phone
>
> What is the least labour intensive way to effect this??
>
> Thanks in advance
>
>
>

Re: import data

am 03.05.2007 06:38:56 von Ed Murphy

Mark S wrote:

> Not to belabor the point (versus to more fully explain), but say I have two
> data sets
>
> [ Company Name | Address ]
>
> and
>
> [ Company Name | Phone ]
>
> and I want to import them both into a database with separate three tables:
>
> 1. Company Name
> 2. Address
> 3. Phone
>
> What is the least labour intensive way to effect this??

I would create a table with columns (name, address, phone), import
into it, then use queries to copy its data to the other tables.