Results 1 to 3 of 3

Thread: [Resolved] - SQL query re: Exchange rates - data included.

Threaded View

  1. #1

    Thread Starter
    Fanatic Member RSINGH's Avatar
    Join Date
    May 2001
    Location
    London
    Posts
    522

    [Resolved] - SQL query re: Exchange rates - data included.

    OK

    I have a table of exchange rates as below against USD.
    Code:
    BaseCurrency	Traded	Rate
    USD		ATS 	13.644323
    USD		AUD 	1.7755681818181817
    USD		BRL 	3.6749999999999998
    USD		CAD 	1.5840000000000001
    USD		CHF 	1.4527000000000001
    USD		CLP 	704.89999999999998
    USD		COP 	2705.0
    USD		CZK 	30.361999999999998
    USD		DEM 	1.9393456
    USD		DKK 	7.3613999999999997
    USD		ESP 	164.98363900000001
    USD		EUR 	0.99157164105106599
    USD		GBP 	0.63307166371233226
    USD		USD	1
    Now I know it is possible truiangulate these so that I have exchange rates across all currencies. I would like is to get all the exchange rates across Eur, USD and USD against all currencies as in the table below. Can anybody help. It can be done in SQL and I think it involves various self joins converting to USD and then to the relevant base currency but my brain has melted.

    Code:
    USD		ATS 	13.644323
    USD		AUD 	1.7755681818181817
    USD		BRL 	3.6749999999999998
    USD		CAD 	1.5840000000000001
    USD		CHF 	1.4527000000000001
    .....
    GBP		ATS 	[rate]
    GBP		AUD 	[rate]
    GBP		BRL 	[rate]
    GBP		CAD 	[rate]
    GBP		CHF 	[rate]
    .....
    EUR		ATS 	[rate]
    EUR		AUD 	[rate]
    EUR		BRL 	[rate]
    EUR		CAD 	[rate]
    EUR		CHF 	[rate]

    where [rate] is the calculated value
    All help will be greatly appreciated.
    Last edited by RSINGH; Nov 19th, 2002 at 07:41 AM.
    The liver is bad. It must be punished.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width