UNION Quries and 'Memo' fields

M

Morris.C

I'm getting a strange error when I include a 'Memo' field in a UNION query.

The three queries within this UNION query produce the same field names and
field types and the number of fields is the same

One of the contributing fields has a data type of "MEMO" and > 256
charactors of data.
The UNION of this field does not reproduce the required data.
Instead of the lengthy text, a few charactors of garbage is produced
Is there a way to do a UNION query on a 'Memo' field?


SELECT *
FROM qry_Plan1;

UNION SELECT *
FROM qry_Plan2;

UNION SELECT *
FROM qry_Plan3;

By the way, I'm using Access-97

Thanks.
 
D

Douglas J. Steele

Try UNION ALL instead of UNION.

UNION eliminates any duplicate rows that might occur, and in order to
eliminate duplicates, Access truncates Memo fields to 255 characters.
 
D

david epsom dot com dot au

If possible, use
Union All
instead of
Union

If not possible, do the Union first, then join back
to get the Memo fields.

If you absolutely do need to group on the memo field
-- well, this has never worked properly. You can
convert to a text field first (255 characters), or
you can try to reorganise so that you Union Tables
instead of trying to Union Queries.

(david)
 

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