OK, I've digged some web sites and do not think how this situation works or even if it's possible .
I am using SQL Server 2008 and there is a calculated column where I am trying to understand some values about foreign currency exchange rates.
While running in the same table can be easy for a long time, I want to use the correct solution that includes two separate tables
table The sticky part comes with currency-dependent calculations. Currently calculating only Then the current formula looks like something: Is it possible that: ??? You can not see directly in another computed column from another table (see). Here are some options. , 'CR4'), you can use a view: You can define the function to check currency. T1 keeps a log of the transaction. Table
t2 contains basic information for a given currency, two tables can be added using the
currencyCode attribute.
CR1
CR3
CR3
CR4 < / Code>, but in the future the more currencies are added, the different capacities are different for the new currencies, so ideally, a new row is passed to
t2 and A bit flag will be added to (
flagCurrencyCalc ) which is not used or used in alternative calculations Has been specified.
(when [currencycode] = 'CR1' or [currencyCode] = 'CR2' or [currencyCode] = 'CR3' Or [currencyCode] = 'CR4' again (Formula 1) and (Formula 2) end) As you can see, I have to go manually and with new currency. The format must be changed by adding another or statement. .
(when t2.flagCurrencyCalc = true ) for the currency code given in a record then in T1
Found (formula1) second (formula 2) end)
Select view vw_tablename t * (When the matter is in currency (Select Currency from ListOfCurrencies from where.) Then (formula1) second (formula 2) end);
No comments:
Post a Comment