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
 SQL Server Development (2000)
 selecting multible fields from a table

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-07-14 : 06:59:22
Brian writes "Basic info: I have a table that keeps track of parent/child relationships for employees. This relationship is derived from an employees table that has an employee id which is an identity. These employees also have a unique organization id.

Anyways, I need to select all of the "child id's" that have a null parent id value. These child/parent id's match the identity created when they are inserted into the employee table. I then need to select the supervisor id from the employees table from those with null parent id's. I then need to select the employee id that matches the supervisors id in the employee table. I then need to update the employee relationship table.

How can I select multiple id's into a variable and pass them along to complete this task?"

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2005-07-14 : 12:50:55
please post some DDL for the tables in question. We can probably come up with an exact solution for you.

See Brett's blog for the specific information we need http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx

Off the top of my head, I think you need to concatenate your UIDs into a CSV and pass that CSV to your sproc. But my head nearly exploded trying to read your explanation, so I could be way off.



-ec
Go to Top of Page
   

- Advertisement -