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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help need in SQL(BO)

Status
Not open for further replies.

prkr8

Technical User
Aug 25, 2004
13
US
I am calucating the Work duration time of start and completion Date,Means Work duration=work completion date-work start date.
if work completion date is NULL means work not completed , then work completion date has to replace with system date(Current date).
How we do that in BO
Thanks in advance.
 
Build a variable.

=if IsNull(<completion date>) then CurrentDate() else <completion date>

Steve Krandel
VERITAS Software
 
Steve

Could you also use

Code:
CASE WHEN completiondate is null then currentdate
else completiondate
END

[bandito] [blue]DBomrrsm[/blue] [bandito]

[blue]Software code, like laws and sausages, should never be examined in production[/blue][black] - [/black][purple]Edward Tenner[/purple]
 
Sure.

Your solution works at in the universe. Mine is for the report.

I prefer to do things at the universe whenever possible.

Steve Krandel
VERITAS Software
 
Thanks for the clarification Steve

[bandito] [blue]DBomrrsm[/blue] [bandito]

[blue]Software code, like laws and sausages, should never be examined in production[/blue][black] - [/black][purple]Edward Tenner[/purple]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top