Hi,
Need to build one function by pass parameters and create one temp temp inside that to store fetched values and finally return the max of column values from that temp table as output
EX:
fn_test (@P1,@P2)
declare @temp (val 1, val 2)
insert into @temp (1,2)
insert into @temp (3,4)
select max(val1) from @temp -- as output and return
Thanks
Sathish