calculating expiration dates

I am struggling to complete a formulation for calculating the expiration of data entered which depending on which database table they are in depends on their expectoration time, either 24hrs, 7days, 14days or 21 days.
If there isn't any withing that particular table then it will default to 14.
This is my so far attempt, but have gaps i know and it is so frustrating that I cannot get my head around it....If anyone can shed some light it would be gratefully appreciated.
@example = INT(Table.example/2) MOD 2 <> 0

Open in new window

If {@example} then 1
Else
(

If IsNull{table.NAME} then
14
Else if {table.NAME}= help then
7
Else if {table.NAME} = more help then
21
Else
14
) 

Open in new window

Kev woodAsked:
Who is Participating?
 
Kev woodConnect With a Mentor Author Commented:
I have managed to work out this answer to this.

I just need to add the timedate.name within the table and + the formula that I have written above to get the total i needed
1
 
PortletPaulfreelancerCommented:
Are you looking for a SQL query to update a table, or a select query?

What database type are you using. Eg Oracle, MySQL, SQL Server eyc.
0
 
Kev woodAuthor Commented:
This formulation is to be pulled out of live data that is being changed and updated regular. I believe is is on Oracle.
0
 
Pawan KumarDatabase ExpertCommented:
great :)
1
 
Kev woodAuthor Commented:
Solved
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.