I think, reversing the sort and getting the first record will do.
20-07-2011 16:32, Krishnakant Mane yazmış:
Hello all,
Subject line says it all.
Basically what I want to do is to get last record from a result set.
I am dealing with a situation where given a date I need to know the last
Well, there won't be a consistent result using sort because there might
be 10 rows with same voucher code and same account code.
That's exactly the challenge so I don't know how sort will help.
If we can invert the entire resultset having the last record become
first, then its worth while.
.
Simon
-Original Message-
From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com]
On Behalf Of Krishnakant Mane
Sent: 20 July 2011 15:16
To: sqlalchemy@googlegroups.com
Cc: Timuçin Kızılay
Subject: Re: [sqlalchemy] how to get last record from a resultset
Well