1
Answer

Dynamically changing Column Name

pradeep kumar

pradeep kumar

11y
1.1k
1

@Status varchar(50)=null

select
  x.name,
  --x.Status => this status column name should change according to parameter passed
  (case when @status='Success' then x.status as 'SuccessCount'
  else 'FailCount' end)


from tblabc x

how to proceed...?

thanks in advance...,
Answers (1)