I am converting a database from Oracle to SQL-Server 2005 and in that context I needed to implement a function in the database. My database default uses the dbo schema and the function is there too. I define a function called "Translate" and wanted to use it like this :
SELECT
translate(Phonenumber, '0123456789 ()+-', '0123456789') as Phonenumber
FROM
Customer
but what pussled my was that in order to make this work I had to prefix the translate method with "dbo." like this :
SELECT
dbo.translate(Phonenumber, '0123456789 ()+-', '0123456789') as Phonenumber
FROM
Customer
as all "objects" I'm using resides in the dbo schema - why must I prefiks only the function and not the table?Yes, functions will defintely need the owner / schema prefix.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
No comments:
Post a Comment