Union between unequal fields?

R

Razor

Hi,

How can I union a table (100 fields) with a query (4
fields, all 4 matching the table's fields) such that the
resulting union has nulls is the remaining 96 fields for
the records contributed to the union by the query.

I tried creating placeholders for the remaining 96 fields
in the query ([FieldName]: Null) but when I try unioning
the 100-field table to the 100-field query, it tells me
that there are too many fields defined.

This dataset is completely de-normalized. It is the
result of a feed and I do not want to solve this proble
through normalization.

Thanks!

Regards,
Razor
 
J

John Vinson

it tells me
that there are too many fields defined.

There are. You're limited to 255 fields in a Query.
This dataset is completely de-normalized. It is the
result of a feed and I do not want to solve this proble
through normalization.

Then I see no way to accomplish what you ask.
 
J

John Spencer (MVP)

I'm not sure I understand your problem.

Is your query something like:

SELECT FieldA, FieldB, FieldC, FieldD, Field5, Field6
FROM TableA
UNION
SELECT Field1, Field2, Field3, Field4, NULL, NULL
FROM QueryOne

That should work as far as I know. If you exceed the 255 field limit then you
should have a problem, but based on your description, I don't see that happening.
 

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