Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I call a function in SQL Server 2005 without the [dbo]?

I have a 3rd party program that insists on rewriting certain SQL statements using UCase(value). UCase is not supported by SQL Server 2005, so I thought I could create a User-Defined-Function that returns UPPER(value) and assign it an Alias of UCase, however it appears that I still need to use [dbo].[Alias]

Is it possible to call a User-Defined-Function without the [dbo] prefix? Or is there a way to get SQL to run SELECT UCase('abc') as SELECT UPPER('abc')?

like image 763
Rachel Avatar asked Nov 04 '22 17:11

Rachel


1 Answers

Sadly, no, it is not possible to call a UDF in SQL Server without prefixing it with the owner. You can find a number of discussions on this topic here:

http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=call+sql+server+function+without+dbo+prefix

The solution, of course, is to get the 3rd party to fix the application. Is this not an option?

like image 131
Michael Ames Avatar answered Nov 09 '22 05:11

Michael Ames