Are you sure that it's not null?
-
Recently found this in one of our stored procs. I think they really wanted to make sure the values are not null.
SELECT
IsNull(CASE WHEN Sum(IsNull(I.Value1,0)) IS NULL THEN 0 ELSE Sum(IsNull(I.Value1,0)) END, 0) - (Sum(IsNull(I.Value1,0)) + Sum(IsNull(I.Value2, 0)) - Sum(IsNull(I.Value3, 0))))) * 100 / ((100 * @Vatrate) + 100) AS Net
FROM II have renamed the table and field names. And don't even get me started on the problems with the vatrate.
-
Recently found this in one of our stored procs. I think they really wanted to make sure the values are not null.
SELECT
IsNull(CASE WHEN Sum(IsNull(I.Value1,0)) IS NULL THEN 0 ELSE Sum(IsNull(I.Value1,0)) END, 0) - (Sum(IsNull(I.Value1,0)) + Sum(IsNull(I.Value2, 0)) - Sum(IsNull(I.Value3, 0))))) * 100 / ((100 * @Vatrate) + 100) AS Net
FROM II have renamed the table and field names. And don't even get me started on the problems with the vatrate.
are you sure? are you really sure? are you really really sure? are you really really really sure? are you really really really really sure? are you really really really really really sure?
Yusuf May I help you?
-
are you sure? are you really sure? are you really really sure? are you really really really sure? are you really really really really sure? are you really really really really really sure?
Yusuf May I help you?
Yusuf wrote:
are you sure? are you really sure? are you really really sure? are you really really really sure? are you really really really really sure? are you really really really really really sure?
Cool! Cool Cool! Cool till infinity :-)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You
-
Recently found this in one of our stored procs. I think they really wanted to make sure the values are not null.
SELECT
IsNull(CASE WHEN Sum(IsNull(I.Value1,0)) IS NULL THEN 0 ELSE Sum(IsNull(I.Value1,0)) END, 0) - (Sum(IsNull(I.Value1,0)) + Sum(IsNull(I.Value2, 0)) - Sum(IsNull(I.Value3, 0))))) * 100 / ((100 * @Vatrate) + 100) AS Net
FROM II have renamed the table and field names. And don't even get me started on the problems with the vatrate.
-
are you sure? are you really sure? are you really really sure? are you really really really sure? are you really really really really sure? are you really really really really really sure?
Yusuf May I help you?
-
It’s absolutely redundant as is the programmer or the DBA who has created this gem.
The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.
-
It’s absolutely redundant as is the programmer or the DBA who has created this gem.
The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.