Hi Guys
I am writing some reports with multiple calculation using IF statements where the logic of the expressions is the same. Does anyone know if it's more efficient to stay like this or create another calculated data item (say called 'Q') which just tests the logic giving a simple answer and then use 'Q' as the simple logic test for all the other calculations?
I'm not sure that's clear so here's a couple of examples:
Either
Item 1If (A=B AND C=D AND E=F AND G<>H) then (S) else (T))
Item 2If (A=B AND C=D AND E=F AND G<>H) then (U) else (V))
Or
QIf (A=B AND C=D AND E=F AND G<>H) then ('Y') else NULL))
Item 1: (If Q is not missing then (S) else (T))
Item 2: (If Q is not missing then (U) else (V))
If it matters I'm using SQL.
Thanks in advance
Simon Rouse
I am writing some reports with multiple calculation using IF statements where the logic of the expressions is the same. Does anyone know if it's more efficient to stay like this or create another calculated data item (say called 'Q') which just tests the logic giving a simple answer and then use 'Q' as the simple logic test for all the other calculations?
I'm not sure that's clear so here's a couple of examples:
Either
Item 1If (A=B AND C=D AND E=F AND G<>H) then (S) else (T))
Item 2If (A=B AND C=D AND E=F AND G<>H) then (U) else (V))
Or
QIf (A=B AND C=D AND E=F AND G<>H) then ('Y') else NULL))
Item 1: (If Q is not missing then (S) else (T))
Item 2: (If Q is not missing then (U) else (V))
If it matters I'm using SQL.
Thanks in advance
Simon Rouse