Advertisement

05.06.2008 at 11:51AM PDT, ID: 23380525
[x]
Attachment Details

Slow Union Query

Asked by ClaudeWalker in SQL Query Syntax, Microsoft Access Database

I inherited a large un-normalized database.  I have a union query that runs really slow.  The problem is that every time a key is pressed in a text box a listbox updates with the values of the query.  So this coninually re-runs the query every time the key is pressed.  I would prefer not to get rid of this feature.

P.S.  The naming conventions suck and are not of my making.

Here is the SQL:

Thanks, JOe K.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
SELECT[WX Jobs].FileNumber AS [JobReferenceID],[WX Jobs].Owner, [WX Jobs].Tenant, [WX Jobs].StreetNumber, [WX Jobs].StreetName, [WX Jobs].[Program/Funding] as [Program]
FROM [WX Jobs]
 
UNION SELECT "PrevWX" AS [JobReferenceID], PreviouslyWeatherized.Owner, PreviouslyWeatherized.Tenant, PreviouslyWeatherized.StreetNumber, PreviouslyWeatherized.StreetName, "PrevWX" AS [Program]
FROM PreviouslyWeatherized;
 
UNION SELECT [HR- Rehab Jobs].[Invoice Number] AS [JobReferenceID], [HR- Rehab Jobs].[Owner], [HR- Rehab Jobs].Tenant,  [HR- Rehab Jobs].[Street number], [HR- Rehab Jobs].[Street Name], [HR- Rehab Jobs].[Funding Source] as [Program]
FROM [HR- Rehab Jobs]
ORDER BY [OWNER];
[+][-]05.06.2008 at 12:07PM PDT, ID: 21510018

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: SQL Query Syntax, Microsoft Access Database
Sign Up Now!
Solution Provided By: aiklamha
Participating Experts: 5
Solution Grade: A
 
 
[+][-]05.06.2008 at 12:22PM PDT, ID: 21510156

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.06.2008 at 01:31PM PDT, ID: 21510783

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.06.2008 at 02:54PM PDT, ID: 21511385

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.06.2008 at 06:47PM PDT, ID: 21512559

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628