Sh M
asked on
SQL function
Hi
I have 2 functions and not sure what it does and why structured this way.
Fun_a:
Create function x()
Return table
As
Return
(Select distinct ID from fun_b(getdate()) as result)
Go
Fun_b:
Create function fun_b(@asifdate datetime)
Return table
As
Return
(
Select distinct cc as ID
( select a,s,f from tbl
Where year = '2014') as result)
Go
What are these getdate and why two functions when get date is not used within query?
I have 2 functions and not sure what it does and why structured this way.
Fun_a:
Create function x()
Return table
As
Return
(Select distinct ID from fun_b(getdate()) as result)
Go
Fun_b:
Create function fun_b(@asifdate datetime)
Return table
As
Return
(
Select distinct cc as ID
( select a,s,f from tbl
Where year = '2014') as result)
Go
What are these getdate and why two functions when get date is not used within query?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
'What the hell is this?' is not the most actionable question.