Sqlserver- Not Null Cases
Hi,
Please help me on below requirement.
In my table, we have 5 columns, and ID is the key column.
And I need a logic like
1. If Reason1 is null & Reason2 is not null then New_Txt
2. If Reason1 is not null and Reason2 is not null then Old_txt
If Reason2 is not null and Reason1 is Not null then New_Txt
( It have to generate 2 diff rows)
Base Table:
IDR1R2Old_txtNew_txt11200 PRO0003AB11200P03Q08GD11200Q08Q09HE
Required OutPut Like :
IDR1R2Old_TxtNew_Txt11200NullP03 B11200P03Q08G 11200P03Q08 D11200Q08Q09H 11200Q08Q09 E
Hi, Please help me on below requirement.In my table, we have 5 columns, and ID is the key column.And I need a logic like1. If Reason1 is null & Reason2 is not null then New_Txt2. If Reason1 is not null and Reason2 is not null then Old_txt If Reason2 is not null and Reason1 is Not null then New_Txt ( It have to generate 2 diff rows)Base Table:IDR1R2Old_txtNew_txt11200 PRO0003AB11200P03Q08GD11200Q08Q09HE Required OutPut Like : IDR1R2Old_TxtNew_Txt11200NullP03 B11200P03Q08G 11200P03Q08 D11200Q08Q09H 11200Q08Q09 E Read More