Relative Content

Tag Archive for sql-serverfunction

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.