You cannot use stored procedures in queries but in Sql 2000 you can use UDF's that return table data type.
>Hi!
>
>I'm new at building stored procedures, and I need some help.
>
>I have a stored procedure that recieves to parameters and it returns an integer depending on some calculations it does.
>
>I want to pass the parameters depending on the results of each query row, for example:
>
>select IdNumber, Name, BirthDay, MyStoredProc(idnumber, birthday)
>from clients
>where status = 1
>
>I know that with the parameters between parenthesis, SQL server assumes that its a function an then returns an error,
>
>How can I call a Stored Procedure from a select statement?
>
>Thanks in advance.
--sb--