Hi all
I'm trying to re-write the convert function for an upcomming ORACLE conversion that I need to do so and since ORACLE already has a convert function built in a need to write a convert2 function which will be a basic wrapper around the convert function.
If anybody has done something like this before then I would appreciate any help but in the mean time the code I've got so far looks like this
create function convert2
(
@p1 nvarchar(128),
@p2 nvarchar(128),
@p3 int = NULL -- can't get optional bit to work on this
)
returns sysname
as
BEGIN
return convert(@p1, @p2, @p3)
END
Problem I've got is that the convert function doesn't like having @p1,@p2@p3 passed into it - any ideas on how to get around this
Thanks
Lee