Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 stored procedure, and it's a doozy

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-04-07 : 08:02:48
larry writes "Alas i am left with a poorly designed db, and am attempting to clean aforementioned db up.

i would like a stored procedure to essentially split data out of a single table (about 18 rows) into two tables that are linked by an occurrence number, one table contains people data, and the other contains stuff data (at least that's what i envisioned), i need to selectivly pull out the people data and insert 4 or so fields into one table, and pull out the stuff data and insert another 4 or so fields into that table. the remaining data is redundant to a third table stored elswhere that i plan to access via a view. then i can link those tables together via the id number as mentioned.


any help appreciated."

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2005-04-07 : 09:05:02
Any chance of sample input data + matching expected results???
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-04-08 : 01:56:25
do you have identifying columns for people and stuff data?

if yes, then create the tables, and split them by querying which is which...

or you can clarify what you really need by providing what andrew is asking

--------------------
keeping it simple...
Go to Top of Page
   

- Advertisement -