|
-
Jun 28th, 2010, 11:34 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Calculated field / column in sql server database
Hi All,
I have two sql database tables one is mydata and another one is fxrates. Now what I want is that I have the below columns in my database.
Columns in Mydata table :
1 ) Object Currency (which contains the text like GBP, EUR, USD etc. which are currency types)
2) Value In Object Currency (Which contains the values in above mentioned currencies)
3) Period (Which has month numbers like 1, 2, 3, .i.e. Jan, Feb and Mar and so on)
4) Year (Which contains years .i.e. 2007, 2008, 2009 and 2010)
Columns in FX Rates table :
1) Exchange Rate (Which contains the exchange for all the above mentioned currencies)
2) Object Currency (which contains the text like GBP, EUR, USD etc. which are currency types)
3) Period (Which has month numbers like 1, 2, 3, .i.e. Jan, Feb and Mar and so on)
4) Year (Which contains years .i.e. 2007, 2008, 2009 and 2010)
Now I want a calculated field which will calculate value in Euros .i.e. the exchange rate is for converting value in euros.
Something like this.
Code:
Fxrates.[Exchange Rate]/mydata.[Value In Object Currency]
But while doing above calculation it should consider the criterias which are period, year and object currency as well.
I need a help on this I have macro which pull data from mydata database table to excel now is it possible for us to have this calculated column in the excel directly or we need to insert a calculated column in sql database. I am ok with both ways. Please help...
Thanks a lot for your help in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|