Home » SQL & PL/SQL » SQL & PL/SQL » CASE
CASE [message #306072] Wed, 12 March 2008 14:19 Go to next message
aarti81
Messages: 235
Registered: December 2007
Location: USA
Senior Member
CASE WHEN NVL(A.STD PROD,0) = 0 THEN 0
WHEN NVL(A.FYEAR TO DATE MH,0) = 0 THEN 0
WHEN NVL(A.FYEAR TO DATE UN ACC,0) = 0 THEN0
ELSE ((A.FYEAR TO DATE UN ACC / (A.FYEAR TO DATE MH/7.5)) / (A.STD PROD * 7.5)) * 100) END AS F3



but i'm not getting the right results,pls any help is grtly appreciated.


Thanks

Re: CASE [message #306074 is a reply to message #306072] Wed, 12 March 2008 14:29 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Weird with the same formula I get the correct result.

Regards
Michel

[Updated on: Wed, 12 March 2008 14:30]

Report message to a moderator

Re: CASE [message #306077 is a reply to message #306074] Wed, 12 March 2008 14:31 Go to previous messageGo to next message
aarti81
Messages: 235
Registered: December 2007
Location: USA
Senior Member
Am i missing any braces or did i use too many,pls gimme a pointer

thnks
Re: CASE [message #306080 is a reply to message #306077] Wed, 12 March 2008 14:37 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Am I missing the error you gave, please (not pls) give me (not gimme) a pointer (to your problem).

Regards
Michel
Re: CASE [message #306082 is a reply to message #306080] Wed, 12 March 2008 14:40 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Just in case you didn't understand what Michel says: we don't have INPUT data and don't know desired RESULT. Several unformatted lines of code taken out of who-knows-where don't mean much.

You'll need to put some extra effort in order to get the answer.
Re: CASE [message #306111 is a reply to message #306074] Wed, 12 March 2008 19:02 Go to previous message
scottwmackey
Messages: 505
Registered: March 2005
Senior Member
Michel, You and I have had and continue to have disagreements about some of your comments, but that was funny. I gotta (oops, got to Wink ) give you this one.
Previous Topic: java.sql.SQLException: ORA-01002: fetch out of sequence
Next Topic: Problem with SYS_CONNECT_BY_PATH
Goto Forum:
  


Current Time: Sat Dec 03 17:55:13 CST 2016

Total time taken to generate the page: 0.04421 seconds