D
Dave Kaplan
I have developed a union query in SQL that returns well over 100,000 records
and involves 7 tables (see below). Copying and pasting is impossible, and I
would like to be able to save the query as a table (like in Make Table).
How do I go about doing this? Thanks
My SQL looks like this:
SELECT [PARCEL_ID],[CITY], [ADDRESS], [Sale_Amt], [Mgt_Amt], [LAND_USAGE],
[SALE_DATE], [MORTGAGE_DATE]
FROM [Akron1]
WHERE [O_R_B] = "R" and [OWNER_OCCUPIED] = "Yes"
UNION
SELECT [PARCEL_ID], [CITY], [ADDRESS], [Sale_Amt], [Mgt_Amt], [LAND_USAGE],
[SALE_DATE], [MORTGAGE_DATE]
FROM [Akron2]
WHERE [O_R_B] = "R" and [OWNER_OCCUPIED] = "Yes"
UNION
SELECT [PARCEL_ID], [CITY], [ADDRESS], [Sale_Amt], [Mgt_Amt], [LAND_USAGE],
[SALE_DATE], [MORTGAGE_DATE]
FROM [Akron3]
WHERE [O_R_B] = "R" and [OWNER_OCCUPIED] = "Yes"
UNION
SELECT [PARCEL_ID],[CITY], [ADDRESS],[Sale_Amt],[Mgt_Amt], [LAND_USAGE],
[SALE_DATE], [MORTGAGE_DATE]
FROM [Aur_Copley]
WHERE [O_R_B] = "R" and [OWNER_OCCUPIED] = "Yes"
UNION
SELECT [PARCEL_ID],[CITY], [ADDRESS],[Sale_Amt],[Mgt_Amt], [LAND_USAGE],
[SALE_DATE], [MORTGAGE_DATE]
FROM [Cuyah_Monroe]
WHERE [O_R_B] = "R" and [OWNER_OCCUPIED] = "Yes"
UNION
SELECT [PARCEL_ID],[CITY], [ADDRESS],[Sale_Amt],[Mgt_Amt], [LAND_USAGE],
[SALE_DATE], [MORTGAGE_DATE]
FROM [NoCanton_Tallmadge]
WHERE [O_R_B] = "R" and [OWNER_OCCUPIED] = "Yes"
UNION SELECT [PARCEL_ID],[CITY],[ADDRESS],[Sale_Amt],[Mgt_Amt],
[LAND_USAGE], [SALE_DATE], [MORTGAGE_DATE]
FROM [Twins_Wads]
WHERE [O_R_B] = "R" and [OWNER_OCCUPIED] = "Yes";
and involves 7 tables (see below). Copying and pasting is impossible, and I
would like to be able to save the query as a table (like in Make Table).
How do I go about doing this? Thanks
My SQL looks like this:
SELECT [PARCEL_ID],[CITY], [ADDRESS], [Sale_Amt], [Mgt_Amt], [LAND_USAGE],
[SALE_DATE], [MORTGAGE_DATE]
FROM [Akron1]
WHERE [O_R_B] = "R" and [OWNER_OCCUPIED] = "Yes"
UNION
SELECT [PARCEL_ID], [CITY], [ADDRESS], [Sale_Amt], [Mgt_Amt], [LAND_USAGE],
[SALE_DATE], [MORTGAGE_DATE]
FROM [Akron2]
WHERE [O_R_B] = "R" and [OWNER_OCCUPIED] = "Yes"
UNION
SELECT [PARCEL_ID], [CITY], [ADDRESS], [Sale_Amt], [Mgt_Amt], [LAND_USAGE],
[SALE_DATE], [MORTGAGE_DATE]
FROM [Akron3]
WHERE [O_R_B] = "R" and [OWNER_OCCUPIED] = "Yes"
UNION
SELECT [PARCEL_ID],[CITY], [ADDRESS],[Sale_Amt],[Mgt_Amt], [LAND_USAGE],
[SALE_DATE], [MORTGAGE_DATE]
FROM [Aur_Copley]
WHERE [O_R_B] = "R" and [OWNER_OCCUPIED] = "Yes"
UNION
SELECT [PARCEL_ID],[CITY], [ADDRESS],[Sale_Amt],[Mgt_Amt], [LAND_USAGE],
[SALE_DATE], [MORTGAGE_DATE]
FROM [Cuyah_Monroe]
WHERE [O_R_B] = "R" and [OWNER_OCCUPIED] = "Yes"
UNION
SELECT [PARCEL_ID],[CITY], [ADDRESS],[Sale_Amt],[Mgt_Amt], [LAND_USAGE],
[SALE_DATE], [MORTGAGE_DATE]
FROM [NoCanton_Tallmadge]
WHERE [O_R_B] = "R" and [OWNER_OCCUPIED] = "Yes"
UNION SELECT [PARCEL_ID],[CITY],[ADDRESS],[Sale_Amt],[Mgt_Amt],
[LAND_USAGE], [SALE_DATE], [MORTGAGE_DATE]
FROM [Twins_Wads]
WHERE [O_R_B] = "R" and [OWNER_OCCUPIED] = "Yes";