-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