I routinely have to take Oracle SQL statements and run them against a SQL server database, and I find myself always doing search and replace to convert nvl() fuctions to isnull() functions.
I want to write a MS-SQL function that will translate and nvl() occurances in a SQL statement into isnull().
So I want to be able to run this:
select nvl('123', '321') from mytable
in MS-SQL w/out copy/pasting isnull().
I tried to create a user defined function for this but didn't get it to work b/c a function requires data types in the parameter declarations.
Any ideas?
I want to write a MS-SQL function that will translate and nvl() occurances in a SQL statement into isnull().
So I want to be able to run this:
select nvl('123', '321') from mytable
in MS-SQL w/out copy/pasting isnull().
I tried to create a user defined function for this but didn't get it to work b/c a function requires data types in the parameter declarations.
Any ideas?