URGENT:how to fix the query must have at least one destination field error (1 Viewer)

elly.khanlar

Registered User.
Local time
Today, 17:55
Joined
Oct 3, 2019
Messages
23
Hi All,

I am trying to make a master list by joining two tables based on the "Source" and "material" field.

this two table that I am trying to join are the result of creating make table from union queries by writing following code:

qryTable123:
SELECT * FROM Table1
Union All
SELECT * FROM Table2
UNION ALL SELECT * FROM Table3;

qmktNewTable:
SELECT qryTable123.* INTO NewTable
FROM qryTable123;


Now, I am getting this error" Query must have at least one destination field" when I tried to join the two tables that are the result of make table from union queries. I check the design grid for the make table from union queries, and both have field in the design grid. Could you please help me solve this issue.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 14:55
Joined
Oct 29, 2018
Messages
21,454
Hi. Just a guess but try it out without the table name. For instance:
Code:
SELECT * INTO NewTable FROM qryTable123
Hope it helps...
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:55
Joined
May 7, 2009
Messages
19,229
then do what it is asking, specify the fields you want to get:

select field1, field2[, fieldX] into NewTable From qryTable123;
 

elly.khanlar

Registered User.
Local time
Today, 17:55
Joined
Oct 3, 2019
Messages
23
Thanks for your response.
I got this error message again while making a select query of two tables.

First 10 fields i chose in design grid are from table A, and the rest are from table B by computing with one fields from table A. I realized that I needed to change the name of one of the field of table B. So i changed the name field in the table and saved it. so i tried update query to use updated one, now I get the error message that says "query must have one destination field. Could you please help me?
 

June7

AWF VIP
Local time
Today, 13:55
Joined
Mar 9, 2014
Messages
5,466
SELECT * INTO NewTable FROM qryTable123 worked for me (so does using table name prefix).

Since you are using wildcards for fields, changing field name in table should not cause issue. Don't see why an UPDATE action would be necessary.

Does UNION query open?

If you want to provide db for analysis, follow instructions at bottom of my post.
 

June7

AWF VIP
Local time
Today, 13:55
Joined
Mar 9, 2014
Messages
5,466
I mean will it open without error after you made this field name change?
 

Users who are viewing this thread

Top Bottom