日期:2014-05-17  浏览次数:20912 次

Oracle过程问题,高手赐教!在线等,解决马上结!
SET   QUOTED_IDENTIFIER   OFF  
GO
SET   ANSI_NULLS   OFF  
GO


ALTER       PROCEDURE   usp_SystemInitialize
(   @InitPassword   nvarchar(20)   )
AS

SET   NOCOUNT   ON

IF   @InitPassword <> 'ePowerHRM '   RETURN   1

--ALTER   TABLE   CI_LIST   DISABLE   TRIGGER   ALL


TRUNCATE   TABLE   SYST_USELOG


DELETE   SYST_OPERATOR   WHERE   F_OPERATORID <> 'SYSTEM '

--ALTER   TABLE   CI_LIST   ENABLE   TRIGGER   ALL


RETURN   0

GO
SET   QUOTED_IDENTIFIER   OFF  
GO
SET   ANSI_NULLS   ON  
GO

这是MSSQL的过程,我现在要迁移到Oracle,这是我迁移的代码,有问题,高手赐教!

Create   Or   Replace   Procedure   Usp_Systeminitialize(Initpassword   Nvarchar2)   As
Begin
    Exit   When   Initpassword <> 'ePowerHRM ';
Delete   Table   Syst_Uselog;
    Delete   Syst_Operator   Where   f_Operatorid <> 'SYSTEM ';
End   Usp_Systeminitialize;

------解决方案--------------------
Create Or Replace Procedure Usp_Systeminitialize(Initpassword in Nvarchar2) As
Begin
if Initpassword <> 'ePowerHRM ' then
return;
end if
TRUNCATE Syst_Uselog;
Delete Syst_Operator Where f_Operatorid <> 'SYSTEM ';
End Usp_Systeminitialize;