Sys(3054,11) Select * ; From Invoice ; Where ; InvoiceId = 3 And ; Between( InvoiceDate, {12/01/01}, {12/31/01} ) ; Into Cursor qroInvoices Use Dbf("qroInvoices") Again In 0 Alias qInvoices Select qInvoices Index On InvoiceId Tag InvoiceId Select ; qInvoices.*, ; InvoiceDetail.Amount ; From qInvoices ; Inner Join InvoiceDetail On ; qInvoices.InvoiceId = InvoiceDetail.InvoiceId ; Into Table InvoiceAmountsI have an index on InvoiceDate I have an index on InvoiceId in both the Invoice and InvoiceDetail. I have an index on Deleted() in both the Invoice and InvoiceDetail.