sql server语句转化成oracle

alter proc skyGetBizKey
V_AddCount int,
V_KeyName Varchar2(128),
V_Retval int Output
As
begin try
begin tran
If Exists(Select IndexValue From skyBizkeys Where BizForm = v_KeyName) Begin
Set v_Retval = (Select top 1 ISNULL(IndexValue, 0) + 1 From skyBizkeys Where BizForm = @KeyName)
if upper(@KeyName) = '$TEMPINSTANCE' and exists(select 1 from skyBizkeys Where BizForm = '$INSTANCE' and IndexValue > @Retval) begin
set @Retval = (select top 1 ISNULL(IndexValue, 0) + 1 from skyBizkeys Where BizForm = '$INSTANCE')
end;
Update skyBizkeys Set IndexValue = @Retval+@AddCount-1 Where BizForm = @KeyName
end;
Else Begin
Insert Into skyBizkeys(BizForm, IndexValue) Values (@KeyName, @AddCount+1)
Set @Retval = 1
end;

1个回答

用这个试试

sqlserver自动生成sql语句工具sqlserver转oracle
http://download.csdn.net/detail/c03424/5832629

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问