Join Number & Text columns

accessfever

Registered User.
Local time
Today, 13:54
Joined
Feb 7, 2010
Messages
101
I have a database and want to create a query to join a number column with a currency column. The first column is a number with double format (e.g. 3.3455 or 5.6). The second column is a currency column (e.g. CHF or EUR). If I just use a simple command such as NUMCUR = NUM1 & CUR2, then I will have 3.3455CHF or 5.6EUR in the new column. However, is it a way to change the number so it is always be rounded in 2 decimals and shows two decimals in the new column (e.g. show 3.35CHF instead of 3.3455CHF or show 5.60EUR instead of 5.6EUR)? I tried to use the round command in the query but it's not working. Any idea?
 
I believe you can do this by not defining a relationship between the tables, so you have a FROM clause like ...
Code:
FROM table1, table2
and a WHERE clause like ...
Code:
WHERE CCur(table1.dblFieldValue) = table2.currValue
But how is advantageous to you? At first glance it seems of dubious value.
 
Those two columns are already in the same table. The original download data of the number column has inifinte decimal places (e.g. 567.89893483 or 7.1 or 123787.009). What I wanted to accompoish here was to show only two decimal places for number and its corresponding currency into the new column.
e.g.
If original NUM1 = 567.89893483 CUR2 = CHF. New NUMCUR=567.90CHF
If original NUM1 = 7.1 CUR2 = EUR. New NUMCUR=7.10EUR
If original NUM1=123787.009 CUR2=USD. New NUMCUR = 123787.01USD

Any idea?
 
Format(Round([NUM1],2),"0.00") & [Cur2]

BTW. Avoid using the term "Join" to mean anything other than a Join between tables/queries.
I think this is why lagbolt misunderstood your question.

You wanted to concatenate the rounded value from a currency field with the value from a text field.
 
Terrific! It worked. Thanks!. I'll keep that in mind not to use the term "Join" in that way.
 
Yes, my misundertanding. Thanks Galaxiom.
 

Users who are viewing this thread

Back
Top Bottom