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 - 2001-12-14 : 10:39:10
|
| Peter writes "NT 4.0 with SP6, SQL 7.0I am trying to get the following to work:SELECT fieldsFROM tableWHERE ValidField(fieldname)where ValidField is a kind of function to do some checks on a specific field. During my 2-day search in BOL and on the internet, I found the way to do this in 7.0 is to use a UDF in a seperate dll. I don't want that. If I used SQL 2000, I could use a CREATE FUNCTION. But I don't use 2000. So I tried to put the validation in a stored procedure and returning all the valid rows. ANd now, I want to use the result of the sp in a query, like:SELECT t.fieldsFROM table t INNER JOIN stored_procedure s ON t.key = s.keybut it gives an error. So my (quite simple) question is: How can I use the result of a sp in a query? I am also working with InterBase, and I can just use "SELECT * FROM sp" there...So can this be done or is upgrading to 2000 a good option so I can use CREATE FUNCTION?" |
|
|
nizmaylo
Constraint Violating Yak Guru
258 Posts |
Posted - 2001-12-14 : 10:55:18
|
| create table #mytemp(product_id varchar(30))insert into #mytempexec stored_procedureselect descriptionfrom product p inner join #myTemp son p.key=s.keydrop table #myTemphelena |
 |
|
|
|
|
|