Is it possible, using SQL, to do comparisions across records?
 
Suppose that you had 1 field called TAX and you wanted to compare each one
to the previous one.
 
Record 1 = TAX (45)
Record 2 = TAX (65)
Record 3 = TAX (22)
 
So using the data above, I would want to compare Record 2 (65) to Record 1
(45) and store it into a new field called DIRECTION.
 
Record 1 = TAX (45)  DIRECTION (Null)
Record 2 = TAX (65)  DIRECTION (up)
Record 3 = TAX (22)  DIRECTION (down)
 
As each records TAX field is compared to the previous records TAX field, if
higher, then DIRECTION = up. If lower, DIRECTION = down.
 
I'm still reading my "Teach Yourself SQL in 10 Minutes" book and just
ordered from LuLu that new book mentioned on this list which will take a few
days to get here. Meanwhile, I was hoping someone could help me with this
question.
 
Thank you.
 
Rick
 
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to