I have a table called Ordhdr, i want to create a query based on the [status] column of that table. I have many statuses that i want to group into Won, Lost, Pending for easier viewing. How do i set my declare, set statement to first 'rename' the current status to WON
, LOST
or PENDING
so i can then display my query results using the new name.
Sample Data
Order 1, STatus is QteCall1 (Pending Status)
Order 2, Status is Converted (Won Status)
Order 3, STatus is Declined (Dead Status)
Order 4, Status is Waiting (Pending Status)
Order 5, Status is NOResponse (Dead Status)'
how would I 'rename' the current status to get results that showed a count of
- 1 Won
- 2 Pending
- 2 Dead