如何在Oracle中写IIF条件
How to write IIF condition in Oracle
我们如何在 Oracle 中编写 IIF 条件。
IIF(ItemType = '-1' , (Select CAST(CAST(ConfigXml as XML).query('data(/configurations/config/itemtypeid)') as nvarchar (64)) from EmailCaptureConfig where OwnerID = 142 and ConfigID = 1), ActionObjecttype) as ActionObject
我需要将上面的 IIF 转换成 ORACLE 但我做不到。我们如何推进这件事。
与此类似:
decode(ItemType, '-1' , (Select CAST(CAST(ConfigXml as XML).query('data(/configurations/config/itemtypeid)') as nvarchar (64)) from EmailCaptureConfig where OwnerID = 142 and ConfigID = 1), ActionObjecttype) as ActionObject
显然 xml 数据类型在 Oracle 中的工作方式与 Microsoft 不同。
我们如何在 Oracle 中编写 IIF 条件。
IIF(ItemType = '-1' , (Select CAST(CAST(ConfigXml as XML).query('data(/configurations/config/itemtypeid)') as nvarchar (64)) from EmailCaptureConfig where OwnerID = 142 and ConfigID = 1), ActionObjecttype) as ActionObject
我需要将上面的 IIF 转换成 ORACLE 但我做不到。我们如何推进这件事。
与此类似:
decode(ItemType, '-1' , (Select CAST(CAST(ConfigXml as XML).query('data(/configurations/config/itemtypeid)') as nvarchar (64)) from EmailCaptureConfig where OwnerID = 142 and ConfigID = 1), ActionObjecttype) as ActionObject
显然 xml 数据类型在 Oracle 中的工作方式与 Microsoft 不同。