Re: Importing from a spreadsheet.
From: Chris (Chris_at_discussions.microsoft.com)
Date: 12/17/04
- Next message: Angel: "pls help! - displaying result of 2 str proc. in 1 tbl"
- Previous message: Chris: "Re: Importing from a spread***."
- In reply to: Chris: "Re: Importing from a spread***."
- Next in thread: Zach Wells: "Re: Importing from a spread***."
- Reply: Zach Wells: "Re: Importing from a spread***."
- Reply: Hugo Kornelis: "Re: Importing from a spread***."
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 17 Dec 2004 09:43:06 -0800
One other note, this will be a one time imort, so speed is not an issue, just
ease of programming.
"Chris" wrote:
> The spread*** I have is a big mess of many different entities in the same
> row. There fore, some of the data goes in one table, and some in another,
> split across 5 different tables.
>
> I don't know DDL that well, but I'll give it a shot with a simplified example.
>
> My spread*** would contain: License_Id, Software_Name,
> Operating_System_Name
>
> And my DB:
>
> CREATE TABLE License
> (
> Id Int,
> Software_Id Int,
> Operating_System_Id Int
> ...
> )
>
> CREATE TABLE Software
> (
> Id Int,
> Software_Name varchar
> ...
> )
> CREATE TABLE Operating_System
> (
> Id Int,
> Operating_System_Name varchar,
> ...
> )
>
> Thanks,
> Chris
>
>
> "Zach Wells" wrote:
>
> > Chris wrote:
> > > Hello,
> > >
> > > I am a bit of SQL server rookie.
> > >
> > > I currently have a spred*** with data that I want to import into my
> > > database. The data will need to be transformed in somewhat of a complex way,
> > > splitting it up into different tables.
> > >
> > > The way I envisioned the process was:
> > > 1. Import spread*** into a table.
> > > 2. Create SP to transform 1 row, and insert it into the appropriate tables.
> > > 3. Run the SP for each row in the imported table.
> > >
> > > I have no problem with 1 and 2. However I don't know where to start with
> > > step 3.
> > >
> > > Any advice would be appreciated.
> > >
> > > Thank you,
> > > Chris Mohr
> > >
> > >
> >
> > You don't give much detail to go on but I assume there is something
> > within the data that determines which table the row goes in, right?
> > Assuming that is the case, you should be able to come up with 3 INSERT
> > statements that will add teh appropriate data to the corresponding table
> > saving you from having to loop through each row, which will be a very
> > slow process.
> >
> > If you provide some additiona information like DDL, sample data, and an
> > rules for determining where each row goes, someone will likely be able
> > to help you come up with the INSERT statements.
> >
> > Zach
> >
- Next message: Angel: "pls help! - displaying result of 2 str proc. in 1 tbl"
- Previous message: Chris: "Re: Importing from a spread***."
- In reply to: Chris: "Re: Importing from a spread***."
- Next in thread: Zach Wells: "Re: Importing from a spread***."
- Reply: Zach Wells: "Re: Importing from a spread***."
- Reply: Hugo Kornelis: "Re: Importing from a spread***."
- Messages sorted by: [ date ] [ thread ]