-1
如何将此T-SQL查询转换为Oracle?选择case语句时出错
if((select case
when (select top 1 AlertMessage
from ims.dbo.alertlist
where [email protected]
order by TimePeriod desc
) like '%NO_COMMUNICATION_Resolved' then 1
else 0 end)=1)
begin
INSERT INTO [ims].[dbo].[alertlist]
([SiteID],[ThresholdNumber],[SystemID],
[AlertMessage],[TimePeriod],[AlertType],[PollID])
VALUES
(1,@thresnumber,@meter,@message,getdate(),1,0)
end
你有什么试过?当你把它放到Oracle中时你有错误吗?什么是错误? – 2012-08-07 14:02:58
另外,您正在使用哪个版本的Oracle? – Diego 2012-08-07 14:20:13
我使用oracle 11。 – 2012-08-07 14:29:57