pradeep kumar

pradeep kumar

  • NA
  • 94
  • 67.2k

Dynamically changing Column Name

Dec 24 2012 4:44 AM

@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)