2
Answers

how to create paramterised sql function?

Karan Thakkar

Karan Thakkar

6y
543
1
I have one table, in that i have many column name.
but in function there is use of only three column 
 
I want to calculate and insert data in column NO_OF_MONTHS from START_DT to todays date. and there is one more column end date
 
function should have paramter @start_dt and end_dt
 
suppose start date is 1-1-2018 and end_dt is 1-1-2020 
the  function should insert 12 in column NO_OF_MONTHS because its 12 months passed from 1-1-2018.
 
I hope you guys understand my question.
Thanks waiting for reply. 
Answers (2)