Bob
You are spot on, I added a record to tblMonths and it works - thank you!
"Bob Barrows" wrote:
> Is there at least one record in tblMonths? There needs to be a record if the
> query is going to return anything.
>
> AndyK wrote:
> > Bob thanks for the response, agree re complete lack of information
> > from me!
> >
> > OK - I am after two rows and one column of output which looks like
> >
> > Fred
> > Joe
> >
> > All my data will be literal - I am only using tblMonths as I believe
> > I have to quote some table or query as input even if as in this case
> > none of my data is in it.
> >
> > Have this morning discovered that this works fine in Access 2007 but
> > my problem is with Access 2003 - this is my target version. In 2003
> > it returns no data....?
> >
> > Thanks for any further input.
> >
> > "Bob Barrows" wrote:
> >
> >> AndyK wrote:
> >>> Can you?
> >>>
> >>> SELECT "Fred" AS Name FROM tblMonths
> >>> UNION ALL SELECT "Joe" AS Name FROM tblMonths;
> >>
> >> Is the idea to get 12 rows with "Fred" in them and 12 with "Joe"?
> >>
> >> The only possible issue I see is using the reserved keyword "Name"
> >> as your column alias (btw, you only need to use the alias in the
> >> first query - the rest of the queries in a union take the column
> >> names from the first query). Perhaps it would help if you clued us
> >> in on whatever symptom is making you think there is something
> >> "wrong" with this query. We're not psychics, you know :-)
> >>
> >> --
> >> Microsoft MVP - ASP/ASP.NET - 2004-2007
> >> Please reply to the newsgroup. This email account is my spam trap so
> >> I don't check it very often. If you must reply off-line, then remove
> >> the "NO SPAM"
> >>
> >>
> >> .
>
> --
> Microsoft MVP - ASP/ASP.NET - 2004-2007
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>
> .
>
|