Calculation help [message #428284] |
Tue, 27 October 2009 14:00 |
aarti81
Messages: 235 Registered: December 2007 Location: USA
|
Senior Member |
|
|
Hi All
In a report i have two fields:
CONTRACT_NUMBER TIME
0123 22
1254 78
6589 32
DC22 22
DC67 125
The user has the following requirement "When the contract number starts with DC, he doesnt want to see the corresponding value under TIME" , he wants the o/p as:
CONTRACT_NUMBER TIME
0123 22
1254 78
6589 32
DC22
DC67
TIME IS again a calculated field TIME=AVG(T1-T2).
Please need help.
Thanks
|
|
|
|
|
|
Re: Calculation help [message #429975 is a reply to message #429959] |
Fri, 06 November 2009 11:44 |
aarti81
Messages: 235 Registered: December 2007 Location: USA
|
Senior Member |
|
|
CASE WHEN CONTRACT_NUMBER LIKE '%DC' THEN NULL ESLE TIME ENDvamsi kasina wrote on Fri, 06 November 2009 08:50Post it here.
It may be helpful for others.
By
Vamsi
|
|
|
Re: Calculation help [message #430437 is a reply to message #428284] |
Tue, 10 November 2009 07:15 |
cookiemonster
Messages: 13962 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
That doesn't actually do what you want (ignoring the typo of ELSE). That'll suppress the time when the contract number ends with DC.
|
|
|
Re: Calculation help [message #430482 is a reply to message #430437] |
Tue, 10 November 2009 10:56 |
aarti81
Messages: 235 Registered: December 2007 Location: USA
|
Senior Member |
|
|
Thats what i wanted, where ever the contract number starts with DC, i want to see a NULL in the TIME field.cookiemonster wrote on Tue, 10 November 2009 07:15That doesn't actually do what you want (ignoring the typo of ELSE). That'll suppress the time when the contract number ends with DC.
|
|
|
|