Generation

generate functionFri, 20 Jan 2023

если столбец 2 пустой

( [CustomerID] [int] NOT NULL, [A] [int] NULL, [B] [int] NULL ) select CustomerID, case when A is null and B is null then 0 else 0 end as C, case when A is not null and B is not null then A else 0 end as A, case when A is not null and B is not null then B else 0 end as B from Customers

Questions about programming?Chat with your personal AI assistant