Hello all,
I am wondering if its possible to do a Union All Query for 1 table instead of mulitiple tables.
I have 7 columns that im trying to Union. I have it working to an extent right now but its way to slow. I'm wondering what I can do to speed it up. (Im sorting threw about 300,000 records)(Time it takes is a min or more) I also noticed that its doubling the record count when i do it this way which could be why its taking so long.
Also Im using another query to pull the information from this one to fill in a form with the results.
Thanks in advance!
Here is what i have so far,
I am wondering if its possible to do a Union All Query for 1 table instead of mulitiple tables.
I have 7 columns that im trying to Union. I have it working to an extent right now but its way to slow. I'm wondering what I can do to speed it up. (Im sorting threw about 300,000 records)(Time it takes is a min or more) I also noticed that its doubling the record count when i do it this way which could be why its taking so long.
Also Im using another query to pull the information from this one to fill in a form with the results.
Thanks in advance!
Here is what i have so far,
Code:
SELECT [Date],[Number],[Name1],[Name2],[Name3],[Name4],[Count] FROM [Table] ORDER BY [Date] UNION ALL SELECT [Date],[Number],[Name1],[Name2],[Name3],[Name4],[Count] FROM [Table] ORDER BY [Date];
Comment