Re: speed up query execution
Your query looks pretty simple (although it's not recommended to just concatenate strings to your WHERE clause, as it opens your application for SQL Injections, use parametrized query instead ). But in any case, make sure your table has indexes on fields you used in WHERE clause and ORDER BY. In your case, check the table and make sure it has indexes on DT and SP fields.
Re: speed up query execution
I'm surprised it runs at all... it's an incomplete SQL Statement...
-tg
Re: speed up query execution
Quote:
Originally Posted by
techgnome
I'm surprised it runs at all... it's an incomplete SQL Statement...
-tg
Is new for me... my queru run!
Suggest me where is incomplete.
Tks
Re: speed up query execution
Code:
SQL = "SELECT SP tab1 WHERE DT='" & Me.DT3.Text & "'GROUP BY SP"
I think there should be a "From tab1" and if you are using a "GROUP BY" there should be some aggegate function like a sum, count, average, etc.
Re: speed up query execution
Quote:
Originally Posted by
techgnome
I'm surprised it runs at all... it's an incomplete SQL Statement...
-tg
corret with suggestion rasinc...
sorry... but copy and paste with a pice of code i have the from statement:p:D;)