0

Possible Duplicate:
Using currency $ format with sql server?

In Microsoft Sql server I wan to create a table with column like salary but for international company ,for example we have many worker which their salary with dollors and some with euro,or some with pound,so I want to input in salary 2000$ or 2000e,or 2000 £, and do aggregate like sum ,or count,but in design when I choose money for this column,I can not write $ or £,and then sum? how can I show salary whit currency like 2000 in dollors for person1 ,and 2000**£** for person2 , and then sum all deposit on £ or sum all deposit or expenditure in $ dollors. How much MY expenditure in dollors,how much my expenditure in euro or pound.

Community
  • 1
  • 1
user1940864
  • 1
  • 1
  • 3

1 Answers1

4

Store the currency units in a separate column. My own preference would be to use the ISO 4217 codes to record this - so that you can distinguish between multiple currencies that use the same symbol, such as US and Australian dollars (USD and AUD).

Any formatting you require (e.g. to produce $2000.00) ought then to be done at the front-end, rather than in the database.

Damien_The_Unbeliever
  • 234,701
  • 27
  • 340
  • 448