Currency Formatting Union Query

G

Guest

I have a union query as follows:
(select * from qrysumofstdhrs) union (select * from qrysumofothrs) UNION
(select * from qrysumofdthrs)
ORDER BY vendorid, workername, workdate;

Several of the fields should be seen as currency format. I've coded them as
such in the underlying queries, and the underlying queries show them as
currency. The union query respects that format only sometimes. One field
comes through as currency like a champ. Another does not. How can I force the
union query to see them as currency? I'm willing to list the fields I need
rather than "select *" if need be.
 
G

Guest

Try something like:

SELECT vendorid,
workername,
workdate,
CCur([TheCurrencyField])
FROM
(SELECT vendorid,
workername,
workdate,
[TheCurrencyField]
FROM qrysumofstdhrs
UNION
SELECT vendorid,
workername,
workdate,
[TheCurrencyField]
FROM qrysumofothrs
UNION
SELECT vendorid,
workername,
workdate,
[TheCurrencyField]
FROM qrysumofdthrs)
ORDER BY vendorid, workername, workdate;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Currency Format Lost in Union Query 1
Union query 5
Union Query 1
Query is too complex 5
Union Query and Field Alias 7
union query 4
Comlex union query question 4
Union Query - Group & Sum 1

Top