Thursday, March 29, 2012

Deleting records that get too old

I must admit I dont know all that much about SQL, which is why I hope someone can show me the light. I have a script almost finished, however I have no idea how to have it trim database entries that are older than, say, 90 days. Any ideas?WHERE date_file > DATEADD(dd,90,GETDATE())|||"Stay away from the light!" [Donkey from "Shrek"]|||"Stay away from the light!" [Donkey from "Shrek"]

Hey, I thought it was my job to handle the disconnected ramblings....

And btw, you do have a row added datetime column, right?

Of course you do.

(hey buddy, wanna buy a watch...cheap)|||Disconneted ramblings...

...Brett's job. Not yours.

...or rdjabarovs...

...<insert random Maragarita reference here>...

[sniped!]

...or connect the ramblings with a join, but not in WHERE clause.

WHERE disconnected_ramblings = ...

Not good.

Is it Friday yet?|||I'm confused.

Huh?

I think I lost my =|||Kansas?

There are only 2 things that come from Kansas boy.....

Steers...ok never mind

BUT, can you tell me the movie?

Did we scare him/her off...

And what about DB2

Damn...gotta run to THE city...

later|||Brett, someday some company will create a programming language that will allow you code in stream-of-consciousness, and you will be a happy man.|||WHERE date_file > DATEADD(dd,90,GETDATE())Wait a minute, shouldn't it be "WHERE date_file < DATEADD(dd,-90,GETDATE())"?|||Now WHERE did I put that backup...?|||Brett, someday some company will create a programming language that will allow you code in stream-of-consciousness, and you will be a happy man.

They did...it's called REXX

I love the INTERPRET keyword most of all scarecrow...

No comments:

Post a Comment