×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

elo =) I have a table with a TIM

elo =) I have a table with a TIM

elo =) I have a table with a TIM

(OP)
elo =)

I have a table with a TIMESTAMP in it, where i like a PROCEDURE to do a check though the table, if any of the record is older then 2weeks (14days) they shall be deleted.
I have tryed something, where i use SELECT EXTRACT YEARDAY, as i saw days was easy to work with, after that i cant get weeks out. But i have still not got any luck geting something together. If u have any idea plz reply =)

(using IB 6.0)

Thx
Gandi

RE: elo =) I have a table with a TIM

What about:

Delete from yourtable where YourData < today - 14

Steven van Els
SAvanEls@cq-link.sr

RE: elo =) I have a table with a TIM

(OP)
yeah i have tryed that, but it doesn't work. Becasue i cant use CURRENT_DATE, i can only use CURRENT_TIMESTAMP (here i get both date and time), so when i do the -14 it takes it from the time or something, becasue it dont work. And if i try to use CURRENT_DATE it pops up the error:

SQL error code = -104
Client SQL dialect 1 does not support reference to DATE datatype

I'm using Interbase 6.0 and u dunno what it's talking about =) anyone have some ideas how to solve this ?

Thx
Gandi

RE: elo =) I have a table with a TIM

I know that that from interbase 5 to 6 some modifications are introduced in the DateTime type, but there must be a type conversion function to extract the date part.

Steven van Els
SAvanEls@cq-link.sr

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close