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

If IsNull{table.NAME} then
Else if {table.NAME}= help then
Else if {table.NAME} = more help then

Open in new window

Kev woodAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PortletPaulEE Topic AdvisorCommented:
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.
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.
Kev woodAuthor Commented:
I have managed to work out this answer to this.

I just need to add the within the table and + the formula that I have written above to get the total i needed

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Pawan KumarDatabase ExpertCommented:
great :)
Kev woodAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.