Hi,
I can not use getdate() inside user define function? What can i
replace with that?
Thank you very much!
Best regards,
Florence
The best option is to pass it in...
CREATE FUNCTION YourFunction(@.param1, @.param2, ..., @.TheDate DATETIME)
...
SELECT ColA, ColB, ColC,
dbo.YourFunction(ColA, ColB, ColC, ..., GETDATE())
...
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
"Florence Lee" <florencelee@.visualsolutions.com.my> wrote in message
news:OlK%23p%23V6EHA.2568@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I can not use getdate() inside user define function? What can i
> replace with that?
> --
> Thank you very much!
> Best regards,
> Florence
>
Showing posts with label ireplace. Show all posts
Showing posts with label ireplace. Show all posts
Monday, March 12, 2012
Friday, March 9, 2012
inside user define function can not use getdate() function?
Hi,
I can not use getdate() inside user define function? What can i
replace with that?
Thank you very much!
Best regards,
FlorenceThe best option is to pass it in...
CREATE FUNCTION YourFunction(@.param1, @.param2, ..., @.TheDate DATETIME)
...
SELECT ColA, ColB, ColC,
dbo.YourFunction(ColA, ColB, ColC, ..., GETDATE())
...
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Florence Lee" <florencelee@.visualsolutions.com.my> wrote in message
news:OlK%23p%23V6EHA.2568@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I can not use getdate() inside user define function? What can i
> replace with that?
> --
> Thank you very much!
> Best regards,
> Florence
>
I can not use getdate() inside user define function? What can i
replace with that?
Thank you very much!
Best regards,
FlorenceThe best option is to pass it in...
CREATE FUNCTION YourFunction(@.param1, @.param2, ..., @.TheDate DATETIME)
...
SELECT ColA, ColB, ColC,
dbo.YourFunction(ColA, ColB, ColC, ..., GETDATE())
...
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Florence Lee" <florencelee@.visualsolutions.com.my> wrote in message
news:OlK%23p%23V6EHA.2568@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I can not use getdate() inside user define function? What can i
> replace with that?
> --
> Thank you very much!
> Best regards,
> Florence
>
Subscribe to:
Posts (Atom)