Currency Exchange As A Dimesnion

Dec 22, 2004

I have a fact table with amounts, all in a single currncy. I would like to be able to process the cube where I can select the currency from a dimension.

The format of the currency exchange dimension must include date, currency code, and exchange rate, where the native exchange rate (the currency that the amounts are in) is defined as 1.000.

View 7 Replies


ADVERTISEMENT

Currency

Mar 13, 2004

Hello I am a newbe to sql and i am shure my problem is simple but hope somone can help.

My Total comes out like $20.00 and i want it to come out like 20.00€

Simple but frustraiting

Any help apprieciated

Colin

View 4 Replies View Related

SQL Formatting A SUM As Currency

Jan 24, 2007

I need to show my SUM of the 2 columns added in the query below formatted as currency. Is this possible?
SELECT SUM(QVSTDN + QVNONC) AS Total FROM INVOICE_TBL WHERE QVORDN = @QVORDN AND QVINV = @QVINV
 I tried:
SELECT CONVERT(varchar(12), SUM(QVSTDN + QVNONC) , 1) AS Total FROM INVOICE_TBL WHERE QVORDN = @QVORDN AND QVINV = @QVINV
But this does not format it as currency. Any input would be helpful.

View 6 Replies View Related

Currency Problem

Sep 8, 2004

I have a currency that needs to go into the Database. The column in the database is of type money.
When i try ctype or convert into integer, desimal or even sqlmoney type i get an error. Cannot convert data type nvarchar to data type money.

Can anyone help me with this Please.
Here is the code...

sqlcom = New SqlCommand("insert MeasureQuantities(MeasureQuantityName,MeasureQuantityDescrip,MeasureQuantityPrice) values(@MeasureQuantityName,@MeasureQuantityPrice,@MeasureQuantityDescrip)", ocnn)
ocnn.Open()
Dim decPrice As System.Data.SqlTypes.SqlMoney
decPrice.ToDecimal()
decPrice = CType(MeasureQuantityPriceAdd.Text, System.Data.SqlTypes.SqlMoney)
sqlcom.Parameters.Add("@MeasureQuantityName", MeasureQuantityNameAdd.Text)
sqlcom.Parameters.Add("@MeasureQuantityPrice", decPrice) 'MeasureQuantityPriceAdd.Text, System.Data.SqlTypes.SqlMoney))
sqlcom.Parameters.Add("@MeasureQuantityDescrip", MeasureQuantityDescripAdd.Text)
sqlcom.ExecuteNonQuery()

View 2 Replies View Related

Currency Conversion

Apr 10, 2008

Hi i need to apply a currency conversion in my view now i don't have any table which holds the currency value at the moment its hard codes. I can build a tale with the currecnty but am not sure how i would apply this in my view.. without nothing to references it.

View 1 Replies View Related

Format Currency

May 28, 2008

How do I get data that looks like 200,000 returned as a currency format?

Here is what I have in my select statement it doesn't work and can't seem to find an example that works or maybe I just have it set up wrong?

'$' + convert(Sum(OrderHeader.SubTotal)as money) as 'Total Sales'

Ultimately I have a field that is returned and it exists on a reporting services report. I can't find a way just to format the field as currency through the properties either would that be the better way to do it if there is a way?

View 2 Replies View Related

Money/currency

Mar 25, 2007

Hi all. Is there a way in SQL to convert the integer to currency format? just for example....
4000 convert to 4,000
1312500 convert to 1,312,500
30000 convert to 30,000

Most of you will say "Do it in your front end"... but the problem is I don't know how to do it in my Report(Business Intelligence Project). If anyone of you knows, tell me please... Thanks. :)

-Ron-

View 12 Replies View Related

String To Currency

Sep 28, 2007

Hello forum,
I am quering a datebase table from an asp page, comparing values that the user input in a form, value is a string 1000000 and the field in the database that i am compparing from is a currency type, i am getting an error saying that i need to convert to currency, type mistmatch. i am using the following to convert but it does not work, any suggestions.

here is my query:
"SELECT STotalAllocation FROM tabletoquery where STotalAllocation >='" & CCur(Session("plusMillion")) & "' "

'Session("plusMillion") is equal to 1000000

this is the error:
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E07)
Disallowed implicit conversion from data type varchar to data type money, table 'SiteDetail7CMaster', column 'STotalAllocation'. Use the CONVERT function to run this query.
search_report.asp, line 136

View 4 Replies View Related

Currency Format.

Feb 21, 2008

Hi!

I have money value of 56.0000.I want it to only give me the last two decimal places,56.00.I used this one to come up to that result:cast(round(sum(total),2)as int)but my result is this 56.Am i on the right track?

Funnyfrog

View 13 Replies View Related

Currency Variables?

Oct 20, 2006

Starting in my control flow, I execute a data flow that populates a recordset via SQL 2005 Stored Proc. One of the columns in source table is a currency type.

Back to the control flow, I have a for each container that includes an execute sql task that updates or inserts records into another table. I get precision or data type issues since I can not assign the package variable to a currency data type. The only way I can get this to work is if I convert the currency column in my data flow to a string and then cast the variable in my update/insert sql task. Any suggestions?

Thanks....Gary

View 4 Replies View Related

Currency Format

Dec 14, 2006

The $ must appears only on certain total levels and has to be in the same position in the column regardless of the value for financial reporting. In other words, I don't want the $ to float next the most significant digit in the value. See the example below from Excel. Using an IIF statement I can concatenate the $ to the string when it is a certain group level. However, I have tried many various formatting strings but can't find one that results in a fixed number of characters so that the $ will always appears in the same position in the column.

Anyone have a way to do this?













General Government
222
3.45%
$ 405,590,654
1.98%



Public Buildings
194
3.01%
375,453,314
1.83%



Other Facilities
22
0.34%
21,324,140
0.1%



Property Acquisition
6
0.09%
8,813,200
0.04%



Grand Total
6,439
100.0%
$ 20,507,977,298
100.0%



I did get this to work by adding a column to the grouping. That somehow causes the heading size to increase (??) and takes much more time than coding a format code in an expression (I have many reports to do).

View 4 Replies View Related

Decimal Vs Currency....

Jun 19, 2006

It seems that the "decimal" type allows more flexibility but also uses more storage than "money". On the other hand, does "money" have any special t-sql functions that understand its unquie nature? (e.g. adding two money values together with no cents round-off error).

For example, would the number 12345.12 be declared as a decimal(7,2) or currency?



Barkingdog

View 1 Replies View Related

Currency Conversion

May 30, 2008

I have a situation where I have three tables in the source i.e.

1. Currency
2. Currency ExchangeRate
3. ExchangeRateType

I understand the conversion of 1:M, M:1 and M:M currency conversion in the Analysis Services by modeling Currency as a Dim and Exchange Rate as a Fact Table with Time Key for semi-additive aggregation. Same as the way Exchange Rate works in the Adventure Works.

Now the problem we have, there is no one Exchange Rate, we have different Exchange Rate Types. So different Exchange Rate will be applied to different Currency conversion for Calculations.

How to materlized these 3 sources table into a dimensional model in a right way, so it answers all the scanerio.

Thank You

View 1 Replies View Related

Formatting Currency In TSQL

Aug 9, 2002

How can I get the money datatype to return only two decimals instead of four?

View 2 Replies View Related

ASP, SQL Server And Currency Datatype...

May 13, 2005

Hi,

I've just created an ecommerce website using ASP and SQL Server 2000 - on my development machine (WinXP Pro, IIS, SQL Server 2000) the SQL Server datatype for the price field is Money - however, the datatype on my hosts SQL Server is Currency (there is no Money datatype available??)

Now, the problem is this: on my local machine I enter a price of say 99.99 - this shows up on the front-end & in the admin area as 99.99, no problem. Now, on the live server when I enter 99.99 it is somehow converted to 9999 - if I enter 99,99 (with a comma) it shows correctly as 99.99 - however, when I go to edit the price it reverts to 9999...does anyone know what is going on here? Why is it converting 99.99 to 9999??

Please let me know if you need more clarification of the above.

Many thanks,

Peter
__________________
Paliz Design
http://www.palizdesign.com/

View 4 Replies View Related

Convert Data To Currency

Feb 23, 2007

I have a column - datatype 'money' and my price variable is (for instance)
8450
how do I put this value into the money column without getting this error?

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft][ODBC SQL Server Driver][SQL Server]Disallowed implicit conversion from data type varchar to data type money, table 'db196009544.dbo196009544.vehicles', column 'price'. Use the CONVERT function to run this query.

ASP VBScript
I am using this syntax:

price = Upload.Form("price") '---this gives 8450---

SQL="UPDATE vehicles SET price='" & price & "' WHERE id=" & request.queryString("linkID") & ""

Thanks
mark

View 4 Replies View Related

Displaying Results As Currency

May 3, 2004

I'm looking to display the results of the following query as currency. Any help with this would be greatly appreciated...

SELECT SUM (sysTotalCharge) - SUM (sysTotalCredit) AS TotalNet FROM Bookings WHERE (sysRecordDate BETWEEN '01/01/::Year::' AND '01/31/::Year::')

View 2 Replies View Related

Calculating A Local Currency Value

Jun 1, 2004

I've written an Sql statement to extract the Currency Amount and the currency rate and I want to calculate the Amount in Local Currency.

If the currency amount is in the local currency the Currency rate value returned is 0. I have used a case statement to convert the 0 to 1. (is there
easier way)

But I now can't calculate my Local amount value because of the way I have converted the currency rate.

Select IH.Amount, 'Currency Factor' = CASE
when
IH.[Currency Factor] = 0 then 1
else IH.[Currency Factor]
end,



what way should I have written this?

View 4 Replies View Related

Converting From Decimal To Currency

Feb 12, 2008

Hi,

The field below I need to convert to a dollar amount. Can someone help me please?

clm_tchg (decimal(10,2), null)

Thanks

View 5 Replies View Related

UDAs...currency Of Data

Feb 1, 2007

I'm looking more into UDAs and wondering if someone can help me out. I get how I use them and route to them. What about their freshness -- the data? If I'm aggregating data via some methods...when is that underlying data aggregates. When the UDA is called at runtime (coulnd't that hurt performance). I guess I"m likening these things to indexed views with benefits. Am I lost here -- someone help..thanks.

View 1 Replies View Related

How Do I Change The Currency Format?

Nov 28, 2007

It's probably right underneath my nose, but I cannot seem to be able to set the currency format.

My Stored procedure returns an integer that represents a cash value in pennies (like cents).

I then divide this value by 100 and convert it to a Double, so its value is represented in Pounds.

This all works fine, my problem is that when I wrap the above logic in a FormatCurrency, I get a dollar ($) sign before it. How can I change this so that it gives a pound sign (£)?

View 8 Replies View Related

Trying To Understand Currency Conversion

May 16, 2008



I am trying to understand the currency conversion but facing some problems in the same.The more I am tring to understand that the more confused am i getting.

My requirement is specific. I am trying to write sql queries for the measures which come under the scope of currency conversion.

I will query the Cube to get the measure value :

SELECT [Measures].[Sales Amount] on 0 from [Adventure Works DW]

And then query the SQL database as:

Use AdentureWorksDW
SELECT SUM(SalesAmount) FROM FactInternetSales

My understanding is this ( Please correct me if i am wrong) :

If the Currency conversion is:

1. Many to One : Data will be different (in SQL and MDX) as currency conversion is applied which will convert that to a particular (Corporate) currency.

2. One To many : Data will not be different (in SQL and MDX)

2. Many to many : Data will not be different (in SQL and MDX)


I did not get much information on the same from anywhere. I want to undersatnd the script of the Currency conversion. (The script generated by Currency conversion wizard) and then depending on the script (I will extract the Type of conversion) write the SQL for that.

Regards..
Girija Shankar

View 2 Replies View Related

SQL 7.0 In SMS And Exchange?

Oct 24, 1998

Has there been any indication from Microsoft as to when they anticipate using SQL 7.0 in SMS and Exchange? We are currently planning our MCSE+I certification training course schedules through the end of March. We are currently using SMS 1.2 and Exchange 5.5, which use SQL 6.5. We are planning to schedule the SQL 6.5 Admin and Design classes, but knowing when Microsoft will switch to SQL 7.0 for their BackOffice apps may influence our schedule. I have been told that we could take the SQL 7.0 Design class, and the instructor could tell us what has changed since SQL 6.5. I was told that the SQL 7.0 Admin class is very much different, however. Could anyone shed any light on this?

Terry J. LeBlanc
Lambda Novatronics, Inc.

View 1 Replies View Related

DataType For US Currency In SQL Server 2000

Jun 11, 2008

What is the best datatype in SQL Server 2000 to use for a US dollar amount?

View 1 Replies View Related

Sorting Currency In A Stored Proc

Nov 12, 2003

I'm brain-dead so forgive the simple question, but how do you sort a table based on the value in a money datatype field when sorting defaults to:

$1
$10
$15
$2
$20
$25
...
$5
$55
etc.

Obviously this isn't a "sorted by total amount", where I'd want the results returned like:

$1
$2
$3
...
$9
$10
$11
...
etc.

Links to examples or documentation would be great (I've tried searching both these forums and Google already).

View 8 Replies View Related

Currency Dropping Right Zeros In Sybase

Apr 22, 1999

Going against a Sybase database using ODBC, the numeric data in the amount field (money)
drops all zero's to the right of a whole number when bringing it into MSQL 7. Example:

2,000.00 comes across as 2
2,001.00 comes across as 2,001.00

Has anyone a solution to this? What am I doing wrong? If I run a query against the SYBASE
database, everything looks fine. Once I bring it into SQL, I'm about 9,000,000 dollars off.

Thanks for any help you can offer.

View 1 Replies View Related

Please Help: HOW TO FORMAT CURRENCY TO NEGATIVE AMOUNT

Aug 23, 2004

Please help!!!
I'm building a database that I have a form. This form allows user input the invoice amount field which is the currency field. My ultimate goal is allow user put in the postive numbers and it will store as negative amount. Please let me know if there is the way to do that.
Thanks in advance.
Linh

View 1 Replies View Related

How To Convert Null To Currency Or Numeric

May 12, 2006

Greetings -

I have a problem that I am unable to fix. I am migrating data from one ERP system to another ERP system.

I created a table in SQL via DTS by converting an excel file into an SQL Table.

The table has a column 'currentcost'. Most items in the table have a value in this column. However, some items have <null> in this column. I am updating another SQL table with currentcost that is in this column. However, my table being updated requires a value in its corresponding currentcost table. Therefore, my update statement terminates due to the source table having <null> values.

I tried an update statement to convert <null> into a '0'

It was 'update Source_New_ItemMaster set currentcost = '0' where currentcost = <null>

This obviously didn't work. How can a change a <null> value in an SQL table to '0' (zero)?

View 3 Replies View Related

Grouping Column Currency By Range

Apr 11, 2007

HI all -



I need to group data in a sql report by currency values. I have a report that shows part numbers and 4 columns making up manufacturing costs and then a 5th column showing total costs. I would like to add a 6th column that groups the total costs by ranges. The example would be, group all costs > 20000, group all costs 1000 > x > 20000 , and finally all costs < 1000.



How can I accomplish this?

View 3 Replies View Related

Currency Format When Exporting To Excel

Apr 24, 2007

Hi,

I have a problem with the number format when i export my reports to excel with Reporting Services. I set numbers as currency with the command FormatCurrency() in visual studio, but when i export the report to excel, the numbers are considered as text.

Does anyone have a solution?
Thanks in advance.

View 2 Replies View Related

Changing The Currency With Reporting Services

Sep 27, 2007



Hi,

I am formatting a currency field within reporting services using an expression. However i get the $ sign. I need the £ sign. How can i change this?

Thanks

David

View 1 Replies View Related

Store Currency And Volume In Database

Aug 22, 2007

We are creating an enterprise application for fuel, and I am fighting with my DBA about the proper way to store volume and currency in the database. We have 2 main arguments. The first argument is whether we should store costs in the database in $ and convert in the presentation layer, or to store the amount and currency in the database. We sell product from the US in dollar but depending on the customer we may invoice in Euro. Our second argument is the same, execept with volume and UOM. We often purchase product by BBL but sell/transfer by gallon, or Ton.

please tell us the best practice for our dilemma.

View 2 Replies View Related

What Is The Purpose Of [Reporting Currency].[Local] ?

Apr 28, 2007

Hello,



Below is the many to one currency conversion MDX query generated by BI wizard. I am having hard time understanding the purpose of [[Reporting Currency].[Local]. Can anyone explain, why do we need [Reporting Currency].[Local], how does it work in the conversion and where are the relationships established between [Reporting Currency].[Local] member and other measures/dimensions? Thanks.



// This is the Many to One section

// All currency conversion formulas are calculated for the pivot currency and at leaf of the time dimension

Scope

(

{ Measures.[Internet Sales Amount], Measures.[Reseller Sales Amount]} );

Scope( Leaves([Date]) ,

[Reporting Currency].[USD],

Leaves([Destination Currency]));



// Convert Local value into Pivot currency for selected Measures that must be converted with Measure rate [Average Rate]

Scope( { Measures.[Internet Sales Amount], Measures.[Reseller Sales Amount]} );



This = [Reporting Currency].[Local] * Measures.[Average Rate];

End Scope;



End Scope;



// This is the One to Many section

// All currency conversion formulas are calculated for the non pivot currency and at leaf of the time dimension

Scope

(

Leaves([Date]) ,

Except

(

[Reporting Currency].[Destination Currency Code].[Destination Currency Code].Members,

{

[Reporting Currency].[Destination Currency Code].[Destination Currency Code].[USD],

[Reporting Currency].[Destination Currency Code].[Destination Currency Code].[Local]

}

)

);



- SB.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved