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.
| Author |
Topic |
|
nice123ej
Starting Member
48 Posts |
Posted - 2008-06-23 : 21:28:02
|
| HiI have created a user functionthe only way i can use this function is by specifying dbo. as prefix of the functionexample SELECT column1, dbo.MyFunc(column2)FROM mytablewhat i want is something like thisSELECT column1, MyFunc(column2)FROM mytableis this possible? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-24 : 00:01:57
|
quote: Originally posted by nice123ej HiI have created a user functionthe only way i can use this function is by specifying dbo. as prefix of the functionexample SELECT column1, dbo.MyFunc(column2)FROM mytablewhat i want is something like thisSELECT column1, MyFunc(column2)FROM mytableis this possible?
Any reason why you dont explicitly want to specify owner? |
 |
|
|
nice123ej
Starting Member
48 Posts |
Posted - 2008-06-30 : 20:44:52
|
| I dont use dbo. when i execute Stored Procs or select from table,why i need it for Functions only?! |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-06-30 : 22:35:26
|
this is what the BOL says about invoking the UDF.http://msdn.microsoft.com/en-us/library/ms175562.aspxquote: Scalar-valued functions must be invoked by using at least the two-part name of the function
Why ? Ask the designer KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|