Sytze, Tracy's recommendation says, simply, index on Invoice number + Date. Thus, each Invoice is in order and within it the lines are ordered by date, which is what you said you wanted. But Stephen Russel has a good point. Apparently your data has line numbers for the invoices, so why worry about the date? Simply index on Invoice number + Line number. Dan Covill
> > On September 17, 2014 9:40:47 PM EDT, Sytze de Boer <[email protected]> > > wrote: > > > > > >1 I need to have all the entries for the client ordered by invoice > > >number > > >2 but also in date order > > > > > >(Date are set british) > > >Example > > >Date Invnum Qty Amount Desc > > >21/7/2014 1000 1 1000.00 1st line on invoice > > >21/7/2014 1000 1 45.00 2nd line on the > > >invoice > > >(There may be 20 lines) > > > > > >14/7/2014 1001 1 5000 Invoice line 1 > > >14/7/2014 1001 2 34 Line 2 > On Thu, Sep 18, 2014 at 1:44 PM, Tracy Pearson <[email protected]> > wrote: >>> > The quick answer is to index on padl(invoice)+dtos(date) > > -- > > Sent from my Android device with K-9 Mail. Please excuse my brevity. > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

