On 25/07/2009 11:59 AM, David Bicking wrote: > On Sat, 2009-07-25 at 10:33 +1000, John Machin wrote:
>> An accounting system where the sign of the amount is detached and has to >> be obtained from another column is tedious and error-prone; obtaining it >> from TWO columns is "interesting"; > You must have never dealt with SAP. What makes you say that? > The values are all positive, and in > another column they have H or S to say if it is positive or negative. Yes, SAP is an example of the type of system to which I referred. >> a system where the nature of the >> transaction or event is not recorded and has to be reverse-engineered >> from circumstantial evidence is also "interesting" (especially where the >> evidence spans more than one row) -- is this an existing system, or is >> it a prototype that you could reconsider? >> > > The values are always what they are in the amt column, but this report > is tracking changes for a given date. > > d1 and d2 are starting and ending dates. If you have an id that starts > on a given date, but has no prior record ending on that date, then it is > brand new. If one ends on a given date but there is no newer record > starting, then the item was dropped, and represents a decrease in the > total. If an item end son one date, and picks up with a new value, then > it changed. Thanks for the explanation; I presumed without any evidence that the amounts were transactional rather than current totals or balances ... a bit of prejudice carrying over from some systems that I've had to struggle with :-) Cheers, John _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users