Currency Formatting Union Query

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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;
 
Back
Top