Store Columns in a Function to Use as Variable in a View
I have a table exRate, which holds an exchange rate, ExcRate, start date, StartDate, and end date, EndDate. I want to write a function which brings the exchange rate into a view containing order information, where if order date, O_DATE, falls between StartDate and EndDate, I can multiply sales figures by the exchange rate of that date using the variable.
Converting Month which is integer to Varchar, for instance 1,2,3 to Jan, Feb, March in SQL Server
Someone asked this question: I have months stored in SQL Server as 1,2,3,4,…12. I would like to display them as January,February etc. Is there a function in SQL Server like MonthName(1) = January? I am trying to avoid a CASE statement, if possible.