Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple outlet and mulitple days report.

Status
Not open for further replies.

newbie14

Technical User
Feb 14, 2009
81
0
0
MY
Dear All,
I am generating a report based on a table call tblReceipt which have fieilds like outletID, date, totalSales etc. So I am running a report now to get the daily sales for each outlet. So based on a select date I run a for loop date from till date end. So I am running an query like this Select Sum(totalSellingAmount), tblReceipt.outletID From tblReceipt Where tblReceipt.receiptDate = '" + receiptDate + "' And " +
"( " +outletIDString +") Group By tblReceipt.outletID";

The string outletIDString will have an e.g value of outletIDString ="tblReceipt.outletID=4 Or tblReceipt.outletID=5 Or tblReceipt.outletID=6"

I am feeling it is a bit slow can some see how I can improve on this query ? Thank you.
 
Dear R937,
So there is no way to change my query is it ? I am not too use about the indexing? Any guide on this please ? Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top