How to decrement int field?

2001-11-13 Thread Gil G.
Hello, I would really appreciate some help on this, thanks! I have a colomn with days_left, an integer. I have to write a Perl script to run on a cron job once a day and decrement all the fields in that column by 1. Is there a query to do this? Sincerely, Gil. -- http://planenews.com PGP

Re: How to decrement int field?

2001-11-13 Thread Carl Troein
Gil G. writes: I have a colomn with days_left, an integer. I have to write a Perl script to run on a cron job once a day and decrement all the fields in that column by 1. Is there a query to do this? I'll leave the the cron job and perl script to you, but decrementing something is done

RE: How to decrement int field?

2001-11-13 Thread Rick Emery
UPDATE mytable SET myvalue = myvalue-1 WHERE some_condition -Original Message- From: Gil G. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 10:23 AM To: [EMAIL PROTECTED] Subject: How to decrement int field? Hello, I would really appreciate some help on this, thanks! I

RE: How to decrement int field?

2001-11-13 Thread Alok K. Dhir
Update table set days_left = days_left- 1 where days_left 0 [and other conditions]. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] m] On Behalf Of Gil G. Sent: Tuesday, November 13, 2001 11:23 AM To: [EMAIL PROTECTED] Subject: How to decrement int field