March 13, 2006 at 3:06 am
Hello,
I have an application that can connect to both an Oracle and a SQL Server database. I have a query, which gets executed at runtime, that has an NVL in the where clause. I'd like to write a sql server function called NVL so that I don't have change the where clause. I've got a function that works. The problem is that my new function is named 'dbo.NVL'. What can I do so that my function just has the name 'NVL'? That way, I won't have to change any code in my application.
Any help on this one is greatly appreciated.
Thanks,
Bob
March 13, 2006 at 5:05 am
AFAIK User defined functions have to be invoked with at least a two part name dbo.fnMyFunction
March 13, 2006 at 6:05 am
Why not use COALESCE() which is present in both Oracle as well as SQL Server rather than writing UDFs for these ?
March 13, 2006 at 8:31 am
Yes, COALESCE() will do what I need...never thought of it. Thanks for the help.
Bob
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply