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-05-07 : 11:28:08
|
Jeremy writes "Suppose I only have read-only access to a SQL Server 2000 database, therefore I can't modify or drop existing tables or stored procedures, nor can I create new ones. Suppose there is a stored procedure "GetCityList" that returns a recordset like such:State City---------------------WA SeattleWA TacomaCA Los AngelesCA BurbankCA San JoseCA San DiegoKS Kansas CityKS TopekaKS Wichita Now suppose that I want to call GetCityList (which has no parameters) but I only want part of this data, e.g., only the Cities in California.Is there a way I can have the server run a SELECT statement against the result of the GetCityList sproc call, and then return the results of that to me as a recordset?A pseudo-code prototype of what i'm getting at would be: select City from (exec GetCityList) where State = 'CA'; I've already got code (JScript via WSH) that executes the sproc and works with the resulting recordset... i just need a way to re-query or filter out certain things from it.Any ideas?Thanks in advance,-jer" |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2004-05-07 : 11:34:26
|
| create temptableinsert into temptableexec procselect from temptable where criteria is metJay White{0} |
 |
|
|
|
|
|