Setting Format in a Union Query?

  • Thread starter Thread starter mcl
  • Start date Start date
M

mcl

Is there a way to set formats, like number of decimal places, in a union
query?
 
You can try this --
SELECT Union1.XX, format( [Union1].[YY ],"0.000")
FROM Union1
UNION SELECT Union2.XX, format( [Union2].[YY ],"0.000")
FROM Union2;
 
That worked fine. I have another question which I will give it's own title.

KARL DEWEY said:
You can try this --
SELECT Union1.XX, format( [Union1].[YY ],"0.000")
FROM Union1
UNION SELECT Union2.XX, format( [Union2].[YY ],"0.000")
FROM Union2;


mcl said:
Is there a way to set formats, like number of decimal places, in a union
query?
 
Actually I found a better way myself. Just create another query that calls
on the union query for input. I can set formats easy doing that.

mcl said:
That worked fine. I have another question which I will give it's own
title.

KARL DEWEY said:
You can try this --
SELECT Union1.XX, format( [Union1].[YY ],"0.000")
FROM Union1
UNION SELECT Union2.XX, format( [Union2].[YY ],"0.000")
FROM Union2;


mcl said:
Is there a way to set formats, like number of decimal places, in a union
query?
 

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

Back
Top