UNION Quries and 'Memo' fields

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