Hey Gang!
I just need a little help cleaning this up I know it isn't hard but I since I am not an SQL expert I know enough to realize I am missing something. Lets say I have 2 values (ValueA and ValueB) both numerical. If both values are not null then I want the query to give me the sum of (ValueA *.4) and (ValueB *.6)....So no problems there I got that. Here's where I lose it a little. If ValueA is null then I want ValueB in its entirety displayed and vice versa, if ValueB is null give me ValueA in its entirety. So I know I can do this with 2 If then statements, but can I do it with one?
Here's what I have now:
Iif([ValueA]=null,[ValueB],(([ValueA]*.60)+([ValueB]*.4)))
and a second if/then where ValueA and ValueB are reveresed. How can I do this in one statement?
Thanks!
I just need a little help cleaning this up I know it isn't hard but I since I am not an SQL expert I know enough to realize I am missing something. Lets say I have 2 values (ValueA and ValueB) both numerical. If both values are not null then I want the query to give me the sum of (ValueA *.4) and (ValueB *.6)....So no problems there I got that. Here's where I lose it a little. If ValueA is null then I want ValueB in its entirety displayed and vice versa, if ValueB is null give me ValueA in its entirety. So I know I can do this with 2 If then statements, but can I do it with one?
Here's what I have now:
Iif([ValueA]=null,[ValueB],(([ValueA]*.60)+([ValueB]*.4)))
and a second if/then where ValueA and ValueB are reveresed. How can I do this in one statement?
Thanks!
Last edited: