Thursday, January 19, 2017

Call Oracle Stored Procedure using Sql server Database Link

 BEGIN
DECLARE @P_DATE DATETIME=GETDATE()
DECLARE @P_EMPNO VARCHAR(10)
SET @P_EMPNO='2268224413'
DECLARE @P_TRAN_TYPE INTEGER =1
DECLARE @P_LOCNO VARCHAR(10)
SET @P_LOCNO='IT2020'
DECLARE @P_EXCEPTION DECIMAL



EXECUTE ( 'begin PUNCH.INSERT_ATTEND00_FINGER(?,?,?,?,?); end;', @P_DATE, @P_EMPNO, @P_TRAN_TYPE,@P_LOCNO, @P_EXCEPTION OUTPUT) AT FP_ORA;

SELECT @P_EXCEPTION

END

No comments:

Post a Comment