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)
 SQL Server Views

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-04-26 : 08:29:37
Lilupa writes "Hello,
I want to make a join with two views in SQL Server 2000. But the prob is one view I should want to pass 2 parameters. What can I do?. Is there any way to make a join between view and SP.
Thanks.

Lilupa Karunarathne."

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2006-04-26 : 08:29:37
You can use a user-defined function instead of a view. It can accept parameters.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-26 : 09:01:10
>>Is there any way to make a join between view and SP.

1 Select V.cols, Sp.cols from yourView V inner join (code Used in SP) Sp on V.keycol=Sp.keycol
2 Create table #temp(...) -- same structure as that of result of SP
Insert into #temp EXEC SP
Now do join

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -