我有一个名为 Ordhdr 的表,我想根据该表的 [status] 列创建一个查询。我有许多状态,我想将它们分组为 Won、Lost、Pending 以便于查看。如何设置我的声明,设置语句首先将当前状态“重命名”为WON
,LOST
或者PENDING
然后我可以使用新名称显示我的查询结果。
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)'
我将如何“重命名”当前状态以获得显示计数的结果
- 1 赢
- 2 待定
- 2 死