normalizing imported table question  
Author Message
RichCGI





PostPosted: Fri Nov 28 11:21:24 CST 2003 Top

SQL Server Developer >> normalizing imported table question

I have a table that I'm importing data into that I need to
move into normalized tables. My instinct is to use
cursors to read each record and perform lookups to get id
numbers for things like city etc. Is this the approach I
should use or can this be done more efficiently with set-
based operations. Since I'm new to SQL I'm having a hard
seeing how else to do it.

Thanks.

SQL Server192  
 
 
John





PostPosted: Fri Nov 28 11:21:24 CST 2003 Top

SQL Server Developer >> normalizing imported table question Hi

This would not be a problem with naturalkeys! If you need to create
alternate keys then you should be able to use set operations if you create
the data bottom up! You canthen join to the table data created on the upper
levels.

Hope that makes sense!

John



> I have a table that I'm importing data into that I need to
> move into normalized tables. My instinct is to use
> cursors to read each record and perform lookups to get id
> numbers for things like city etc. Is this the approach I
> should use or can this be done more efficiently with set-
> based operations. Since I'm new to SQL I'm having a hard
> seeing how else to do it.
>
> Thanks.


 
 
jbellnewsposts





PostPosted: Mon Dec 01 04:12:24 CST 2003 Top

SQL Server Developer >> normalizing imported table question Sorry..

alternate key should be surrogate key.

John


> Hi
>
> This would not be a problem with naturalkeys! If you need to create
> alternate keys then you should be able to use set operations if you create
> the data bottom up! You canthen join to the table data created on the upper
> levels.
>
> Hope that makes sense!
>
> John
>


> > I have a table that I'm importing data into that I need to
> > move into normalized tables. My instinct is to use
> > cursors to read each record and perform lookups to get id
> > numbers for things like city etc. Is this the approach I
> > should use or can this be done more efficiently with set-
> > based operations. Since I'm new to SQL I'm having a hard
> > seeing how else to do it.
> >
> > Thanks.