SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GOALTER PROCEDURE usp_SystemInitialize
( @InitPassword nvarchar(20) )
ASSET NOCOUNT ONIF @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 0GO
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;
GO
SET ANSI_NULLS OFF
GOALTER PROCEDURE usp_SystemInitialize
( @InitPassword nvarchar(20) )
ASSET NOCOUNT ONIF @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 0GO
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;
Begin
if Initpassword<>'ePowerHRM' then
return;
end if
TRUNCATE Syst_Uselog;
Delete Syst_Operator Where f_Operatorid<>'SYSTEM';
End Usp_Systeminitialize;
;
符号 ";在 "TRUNCATE" 继续之前已插入。
Line: 6
Text: TRUNCATE Syst_Uselog;
我按你写的试了,报这个错误!
CREATE OR REPLACE Procedure Usp_Systeminitialize(Initpassword In Nvarchar2) As
Begin Delete From Syst_Uselog;
Delete Syst_Operator Where f_Operatorid <> 'SYSTEM';End Usp_Systeminitialize;但是有个问题没解决,就是当满足条件退出功能没实现:
if Initpassword<>'ePowerHRM' then
return;
end if
谁帮我搞定一下!
Begin
if Initpassword<>'ePowerHRM' then
return;
end if;
Delete From Syst_Uselog;
Delete Syst_Operator Where f_Operatorid <> 'SYSTEM';End Usp_Systeminitialize;
:=.(@%;
符号 ":=" 被替换为 "SYST_USELOG" 后继续。
Line: 6
Text: Truncate Syst_Uselog;仍然错误
Create Or Replace Procedure Usp_Systeminitialize(Initpassword in varchar2,Rst out int) As
Begin
if Initpassword<>'ePowerHRM' then
Rst:=0;
return;
end if;
TRUNCATE Table Syst_Uselog;
Delete Syst_Operator Where f_Operatorid<>'SYSTEM';
Rst:=1;
End Usp_Systeminitialize;
:=.(@%;
符号 ":=在 "TABLE" 继续之前已插入。
Line: 7
Text: TRUNCATE Table Syst_Uselog;仍然错误,不过我将Truncate table 换成delete from 就没错误了,谢谢!结帖!