Exporting results of a Union query

G

Guest

I want to create a dataset and save it as a csv file. To create the correct
data set I have had to use a UNION query. Everything is working fine up to
the point of exporting.
If I try to export it as a text file I get the error message "Too few
parameters".
If I export to Excel the date format changes. I need to have the short date
format (d/M/yyyy) and that is how it is set in all the source tables but the
data arrives in Excel in a dd-mmm-yy format. The weird thing is that I can
run any of the individual queries that make up the UNION query, export them
to Excel and get the correct date format. However, as soon as I start adding
them together, in any combination, as a UNION query I lose the formatting.
Any suggestions?

Thanks in advance.
 
J

John Nurick

Hi Stavrogin,

1) Is there an error number to accompany the "Too few parameters"
message? Also, this is usually accompanied by an indication of the
number of parameters expected. is that so in this case?

2) Does the workround at
http://support.microsoft.com/default.aspx?scid=kb;en-us;269671 export
the union query successfully?

3) When exporting a date/time field to Excel, what gets exported is the
date/time value in the field; the formatting is secondary (and I don't
know how to control it). But after exporting you can just change the
cell format in the Excel sheet to d/M/yyyy.
 
G

Guest

Hi Stavrogin,
I have encountered the "Too few parameters .." error. One work around is to
use a make table query and export the table.

I generally export dates as 'dd-mmm-yy' which I have found to always be
recognised as a date and provides a predicatable result. You could use
=TEXT([ref],"d/M/yy") within the spreadsheet to provide the required date
format.

I hope this si helpful.
 

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

Top