Hi All,
The value of sProblemID will determine what value that will end up in [IncidentCategoryID],[IncidentDetailID] columns
when I try this code
insert into Customers([IncidentCategoryID],[IncidentDetailID])
select
case when @sProblemID = 1 then 1 end as [IncidentCategoryID] ,
case when @sProblemID = 1 then 11 end as [IncidentDetailID],
case when @sProblemID = 2 then 1 end as [IncidentCategoryID],
case when @sProblemID = 2 then 14 end as [IncidentDetailID]
I am getting an error
The select list for the INSERT statement contains more items than the insert list. The number of SELECT values must match the number of INSERT columns.
How to fix this error