Exporting results of a Union query

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