SELECT A.siebel_row_id AS ASSET_ROW_ID,A.SIEBEL_STATUS ,B.STATUS AS THINDB_STATUS
FROM OR_ASSET_THINDB A ,THINDBUSER.MSI B
WHERE A.msisdn=B.msisdn`enter code here`
and b.circle='Orissa'
and DECODE(a.siebel_status,'Suspended','Active','Active','Active','Inactive','Inactive')<>b.STATUS;
答案 0 :(得分:3)
我不确定这个查询要求,但这是我的理解
<强> DECODE(siebel_status,&#39;暂停&#39;&#39;主动&#39;&#39;主动&#39;&#39;主动&#39;,&#39;无效&#39;&#39;无效&#39)强>
这将起到如下作用:
case
when siebel_status = 'Suspended' THEN 'Active'
when siebel_status = 'Active' THEN 'Active'
when siebel_status = 'Inactive' THEN 'Inactive'
end;
从上面返回的结果将与以下内容进行比较:
的 b.STATUS; 强>
所以最后的答案可能是这样的:
if(&#39; Active&#39;,&#39; Active&#39;,&#39; Inactive&#39;)&lt;&gt; b.STATUS
答案 1 :(得分:1)
and DECODE(a.siebel_status,
'Suspended', 'Active',
'Active' ,'Active' ,
'Inactive' ,'Inactive'
) <> b.STATUS;
它说:
然后将其与b.status值进行比较。