Conditional IIF in query. Help please

cwalter

Registered User.
Local time
Today, 23:14
Joined
Feb 19, 2003
Messages
13
SELECT COUNT(*) as reccount,
SUM(j.duration*#session.payInter.translatorRate#) as tot2pay,
SUM(j.duration) as totduration
FROM jobsDb j
WHERE j.linguistId = #linguistId#
AND j.status = 'completed'
AND j.interInvoiceBilled is not null
AND j.interInvoicePaid is null

j.duration could be a value less than 1 (fraction of hour)
in that case it need to be converted to 1
otherwise use the original j.duration value.

Thanks in advance.
 
iif(j.duration<1,1,j.duration)


Vince
 

Users who are viewing this thread

Back
Top Bottom