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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-02-20 : 08:09:10
|
| Greg Merideth writes "I have a set of tables of which one is company data and one is active tickets. I have multiple stored procedures where I access the data from for a web output using iis/asp. Is it possible to have the output from one stored procedure to be used as input to another stored procedure on the sql box without having to call multiple procedures from within iis?ftGetActiveCompanys - returns a list of active companys which i store into an array.ftGetActiveTicketsByCompany - uses the returned company code from above to return any active tickets in the queue.Can I somehow get the company list (result) from ftGetActiveCompanys to feed into ftGetActiveTicketsByCompany so I can execute one procedure? The ftGetActiveTicketsByCompany performs a COUNT(*) query but has to perform the query based on the company name/code.I can't see how to do a select companyname from customers, (select count(*) from tickets where companycode=(result set from companyname query).I hope that makes some kind of sense and I'd be glad of any pointers or suggestions you could make. I can provide the table structs and what I have now procedure wise if that helps." |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-02-20 : 09:11:20
|
| Create a temp table with the correct structure andinsert #tblexec ftGetActiveCompanys ..==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|