Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a stored proc in a select statement

Status
Not open for further replies.

Boucaner

Programmer
Sep 13, 2004
4
0
0
US
Howdy all,

in a new stored procedure, i want to so a 'select ID from table' to get all of the IDs in the table, and then run an existing SP for each ID. Seems simple enough, but then so am I.

Thanks
 
Stored procedures is one of these areas where many dbms products are far from ANSI compliant. The ANSI term for stored procedures is Persistent Stored Modules (PSM), and were included in the standard in 1996.

You may "run" an existing PSM function(!) for each row in a SELECT result-set, e.g.:

SELECT somefunction(id) FROM sometable
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top