Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Decode with dates 1

Status
Not open for further replies.

ibib3

IS-IT--Management
Feb 14, 2002
14
0
0
GB
Hi

I am trying to convert a simple Access query

IIf([act_start]<[start_time],[start_time],[act_start]) AS insesstart

into an Oracle statement (fairly new to Oracle SQL)

basically it compares an actual start time (act_start) with a planned start (start_time) if the actual is less than the planned start it returns the planned start else the actual.
This is to measure the amount of time used within the core planned times. I will do the same with the finish times.

Can I use decode and if so how?

Many thanks

 

decode(sign(start_time-act_time), -1, act_start, start_time)

Or use a CASE statement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top