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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 combinig the results of a stored procedure into a

Author  Topic 

Apprentice
Starting Member

3 Posts

Posted - 2005-01-26 : 02:28:53
I created a stored procedure which returns a query. how will i be able to combine them..
this is what i did

create procedure sample @string varchar(20) as
select * from table where field = @string
return 0
-assuming that it will only return 1 row
exec sample 'example1'
union all
exec sample 'example2'
union all
exec sample 'example3'

I really need some help with this.. any tips, ideas would truly be appreciated

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2005-01-26 : 03:13:15
i'd suggest this:

create procedure sample @string varchar(200)
as
select * from t where charindex(field,@string)<>0
return 0

exec sample 'dhfhfhf, eufdhj, otototkfkfk, syeye'
Go to Top of Page
   

- Advertisement -