>I have a customer header and customer line items table.
>
>I want to pull the header and LATEST line item record joined
>together.
>
>How do I do this?
Kevin,
SQL server and other backends doesn't have a concept of record number as VFP (and in VFP too in fact there is no record number, it's a calculated value - but since VFP doesn't rearrange data file unless pack,sort etc is used and inserts data at the end of the file physically you may have a 'last' inserted concept there).
You must have a field storing 'last' in some way. ie: OrdItems table of VFP's testdata.dbc have lineno field to keep entry orders of line items per invoice. If you don't do that then there is no guarantee that 'latest' line item would still be 'latest' at next select.
Cetin