Link to home
Start Free TrialLog in
Avatar of Sh M
Sh MFlag for United States of America

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?
SOLUTION
Avatar of Phillip Burton
Phillip Burton

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Did you inherit these functions, and what are you trying to do here?
'What the hell is this?' is not the most actionable question.