Select *, <b>.F. AS AddedField</b> ; From Invoice ; Where ; InvoiceId = 3 And ; Between( InvoiceDate, {12/01/01}, {12/31/01} ) ; Into Cursor qInvoices *!* You may not need to index qInvoices *!* Since I think you only need to index the child table. Test to be sure. *!* Index On InvoiceId Tag InvoiceId Select ; qInvoices.*, ; InvoiceDetail.Amount ; From qInvoices ; Inner Join InvoiceDetail On ; qInvoices.InvoiceId = InvoiceDetail.InvoiceId ; Into Table InvoiceAmounts>Sorry hit submit by mistake
>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 InvoiceAmounts >>