CASE STATEMENT值应为两次 [英] CASE STATEMENT values should be two times
问题描述
HI
SELECT CASE
          IND = 1然后'新'
         当IND = 2那么'老''
         当IND = 3那么'LL'
         当IND in(1,2,3,4,5,6)AND BP_ID = 4 THEN'BP 4 REL'
         完))
          FROM TABLE1
SELECT CASE
WHEN IND =1 THEN 'NEW'
WHEN IND =2 THEN 'OLD'
WHEN IND =3 THEN 'LL'
WHEN IND in(1,2,3,4,5,6) AND BP_ID =4 THEN 'BP 4 REL'
END)
FROM TABLE1
如果案件是由st outfany低于(Expiating)
If case is statify by out is below like(Expiating)
NEW
OLD
LL
BP 4 REL
请任何身体帮助
以上查询显示我的系统只有LL和'BP 4 REL'
above query display my system only LL and 'BP 4 REL'
谢谢
Revathi
推荐答案
CASE表达式按顺序计算WHEN表达式,直到其中一个表达式为止返回TRUE。在这种情况下,返回匹配的THEN表达式。 WHEN表达式的其余部分未被评估。
A CASE expression evaluates the WHEN expressions in order, until one of them returns TRUE. In that case the matching THEN expression is returned. The rest of the WHEN expressions are not evaluated.
目前尚不清楚你的意思是"应该是两次"。表达式只能返回一个值。
It is not clear what you mean with "should be two times". An expression can only return a single value.
您能否全面解释一下您要实现的目标?也就是说,包括一个简短的背景,让你提出这个问题。
Could you give an overall explanation of what you are trying to achieve? That is, include a short background to what lead you to ask this question.
这篇关于CASE STATEMENT值应为两次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!