What I'm trying to do is use more than one CASE WHEN condition for the same column.
(我想做的是对同一列使用多个CASE WHEN条件。)
Here is my code for the query:
(这是我的查询代码:)
SELECT Url='',
p.ArtNo,
p.[Description],
p.Specification,
CASE
WHEN 1 = 1 or 1 = 1
THEN 1
ELSE 0
END as Qty,
p.NetPrice,
[Status] = 0
FROM Product p (NOLOCK)
However, what I want to do is use more then one WHEN for the same column "qty".
(但是,我要对同一列“ qty”使用多个WHEN。)
As in the following code:
(如以下代码所示:)
IF
// CODE
ELSE IF
// CODE
ELSE IF
// CODE
ELSE
// CODE
ask by Nils Anders translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…