I have 2 fields of state like sp_state and org_state. If sp_state is null I need to substitute the value of org_state for the state.
What's wrong in my query?
select sp_state, org_state, iif(sp_state= null, org_state, sp_state) as state from temp; some times both fields will be null, in that case I need to show sp_state value.
Thanks in advance