Setting a format in a field in a union query

Nats

Registered User.
Local time
Today, 05:39
Joined
Jun 21, 2007
Messages
26
Hi everyone,

Please would someone be able to help me?
I have created a union query however, one of the columns, has not picked up the same format as it has in the tables. As in the tables it has this format
'00000'.

Please woud you be able to advise me how I can change the format on one of the 'columns' in my union query. As one column is 'numbers' and the other is 'text'. I need to change the number column so the format is '00000'.

Thank you in advance for your help.

Nats
 
Format

:) Thanks for your reply. I haven't tried that but where would I put that in my SQL Statement?

you know when you do:

SELECT [column name], [2nd column name]
FROM [table name]
UNION
SELECT [column name], [2nd column name]
FROM [2nd table name]


Its the first column that I need to change the format to '00000' as this is how the format is in the table. So where in the above SQL statement would I put your suggestion?

Thank you for you help so far, Its really appreciated.

Nats
 
Format Nightmear

I have just tried putting in like this but comes up syntax error.

SELECT ([Column name]"00000"), [column name 2]
FROM [table name]
UNION
SELECT ([column name]"00000"), [column name 2]
FROM [table name]

I also tried just using this ' symbol in place of the ".

Do you have any other suggestions or can anyone else help at all?

Thanks in advance
 
SELECT Format([YourField],"00000") AS NewField
 
Thanks Neil - i am going to try that now.

However where in the SQL statement would I put that. you know it the one I have set out in my message you replied to .

Thanks again.

Nats
 

Users who are viewing this thread

Back
Top Bottom