Hello everyone...here's a little problem I have. I would like to use a GETDATE()-like function within a function, except I know I can't use GETDATE() within a function I create. What other options can I use? I have tried this:
select dbo.myfunction(mydate)
from
(select
getdate() as mydate
from dbo.mytable) as mydata
(Where myfunction is the function I call, mydate is the alias for the getdate() function)
...but this means that I must go through an extra step in order to pass the date variable into the function. I'd like to do this in just the function alone. Any suggestions?
Thank you,
Middlej
select dbo.myfunction(mydate)
from
(select
getdate() as mydate
from dbo.mytable) as mydata
(Where myfunction is the function I call, mydate is the alias for the getdate() function)
...but this means that I must go through an extra step in order to pass the date variable into the function. I'd like to do this in just the function alone. Any suggestions?
Thank you,
Middlej