I have no experience in creating functions but believe that to solve an issue I have with some sql code I am writing i think this is the way forward
I have some sql code attached which returns multiple columns that gets it information from a single column it splits up this column but I need to resolve the separate columns and the information is contained in a separate table.
I believe to solve this a function that uses the code field from the HornbillLive.dbo.probcode table to returdn the value contained in descx in the same table HornbillLive.dbo.probcode. I would be wanting to modify the case statements to return the descx value instead of the id it is returning at the moment
Hopefully I have explained my self