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
 SQL Server Development (2000)
 use an result from a stored proc in view

Author  Topic 

orson
Starting Member

2 Posts

Posted - 2006-04-10 : 11:25:47
dear forum,

i want to explain my prob.

i have an stored procedure with 3 params which return 2 results

get_price (p_list, p_item, p_date)

and i will build a view

my_view as view_plisten
(
descr_list,
item,
price
)
as
select list, item,
exec(get_price(p_list,p_item,getdate()) as price
from ...


the price is the calculated value for each record in the selection.

thx
denis


khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-04-10 : 11:27:27
this is not possible with stored procedure. However, it is possible with function.



KH


Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2006-04-10 : 11:27:59
Try using a user defined function rather than a stored procedure.

Where's that sniped icon?

==========================================
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.
Go to Top of Page

orson
Starting Member

2 Posts

Posted - 2006-04-10 : 11:39:51
Thx.

works fine with functions.

denis
Go to Top of Page
   

- Advertisement -