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 2005 Forums
 Transact-SQL (2005)
 best to use sql user define function or view

Author  Topic 

desikankannan
Posting Yak Master

152 Posts

Posted - 2010-02-13 : 13:06:40
Hi,
which is best to use user define function or view
retrivew data faster

Desikankannan

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-13 : 13:10:06
that depends on your actual scenario. can you tell what your requirement is?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

desikankannan
Posting Yak Master

152 Posts

Posted - 2010-02-13 : 13:13:20
i have multiple subquries retreving data from 6 tables, which is the best way now to use view or sql function or sql stored procedure

Desikankannan
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-13 : 13:23:08
do you need to make query based on some parameters?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

desikankannan
Posting Yak Master

152 Posts

Posted - 2010-02-13 : 13:26:26
yes

Desikankannan
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-13 : 13:31:40
then you need to go for function or procedure.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-02-14 : 03:03:57
... or dynamic SQL
Go to Top of Page
   

- Advertisement -