Re: delete record that passed > 1 day

2004-06-07 Thread Michael Stassen
starofframe wrote: Thanks a lot Mike... what's a clear explanation... You're welcome. Actually I have used WHERE crea_dt + interval 1 day < curdate() before I read ur reply ...but now I guess I better change it to WHERE crea_dt>curdate-interval 1 day That's probably just a typo, but just in case, y

Re: delete record that passed > 1 day

2004-06-07 Thread starofframe
Thanks a lot Mike... what's a clear explanation... Actually I have used WHERE crea_dt + interval 1 day < curdate() before I read ur reply ...but now I guess I better change it to WHERE crea_dt>curdate-interval 1 day again thanks a lot... and thanks to Jeff too. Sukanto -- MySQL General Mailing L

Re: delete record that passed > 1 day

2004-06-07 Thread Michael Stassen
Jeff Smelser wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Monday 07 June 2004 10:03 pm, starofframe wrote: but delete from table where date_sub(crea_dt, interval 1 day) Here: http://dev.mysql.com/doc/mysql/de/Date_and_time_functions.html I gave you the function.. You can figure out how m

Re: delete record that passed > 1 day

2004-06-07 Thread Jeff Smelser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Monday 07 June 2004 10:03 pm, starofframe wrote: > but > delete from table where date_sub(crea_dt, interval 1 day) should delete all data right??? > All I want is compared to date_now > eg : now is 2004-6-8 and all I want to delete is data t

Re: delete record that passed > 1 day

2004-06-07 Thread starofframe
Yes, I did found out just now... but delete from table where date_sub(crea_dt, interval 1 day) To: <[EMAIL PROTECTED]> Sent: Tuesday, June 08, 2004 9:41 AM Subject: Re: delete record that passed > 1 day -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Monday 07 June 2004 09:22 pm, Jef

Re: delete record that passed > 1 day

2004-06-07 Thread Jeff Smelser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Monday 07 June 2004 09:22 pm, Jeff Smelser wrote: > On Monday 07 June 2004 09:25 pm, starofframe wrote: > > Hi Jeff, > > you mean I can use sql like this > > DELETE FROM table where date_sub(crea_dt, interval 1 day) > > Add: > crea_dt Could be

Re: delete record that passed > 1 day

2004-06-07 Thread Jeff Smelser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Monday 07 June 2004 09:25 pm, starofframe wrote: > Hi Jeff, > you mean I can use sql like this > DELETE FROM table where date_sub(crea_dt, interval 1 day) Add: > crea_dt - -- Anything worth fighting for is worth fighting dirty for.

Re: delete record that passed > 1 day

2004-06-07 Thread starofframe
Hi Jeff, you mean I can use sql like this DELETE FROM table where date_sub(crea_dt, interval 1 day) thanks a lot Sukanto - Original Message - From: "Jeff Smelser" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 08, 2004 8:55 AM Subject: Re: del

Re: delete record that passed > 1 day

2004-06-07 Thread Jeff Smelser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Monday 07 June 2004 08:36 pm, starofframe wrote: > description like this : if now()-crea_dt > 0 then delete select date_sub(crea_dt, interval 1 day) - -- "If you're like me, and I know *I* am..." -- Joel Robinson -BEGIN PGP SIGNATURE---

delete record that passed > 1 day

2004-06-07 Thread starofframe
Hi all, I have mysql table that has a field named 'crea_dt' (it records the creation date of data)... I want to delete records that have passed for more than a day description like this : if now()-crea_dt > 0 then delete But I just can't find the suitable mysql command for this function. Anyo