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)
 SQL FUNCTIONS WITH DDL

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-02-18 : 08:04:04
Madeswaran writes "Is it possible to write a SQL function that is used to create a view?.
If possible show me a sample method "

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-02-18 : 08:06:59
A user-defined function can't make permanent changes to a database's data or structure. You could create a temporary view inside a UDF (never tried it myself) but it wouldn't be particularly useful or accessible outside of the function, and will probably be dropped once the function completes execution.

What are you trying to do? There is probably another way to achieve what you're trying to accomplish.
Go to Top of Page
   

- Advertisement -