CREATE OR REPLACE PROCEDURE p_goodsmfprice(vgdid IN VARCHAR2,
vmfid IN VARCHAR2,
ogmpzkfd OUT VARCHAR2) AS
c_gmf dbusrHQ.goodsmfprice@hdqt_db.gmpzkfd%rowtype;
BEGIN
SELECT distinct gmpzkfd
INTO c_gmf
FROM dbusrHQ.goodsmfprice@hdqt_db
where gmpmfid = vmfid
and gmpgdid = vgdid;
END;
ogmpzkfd := c_gmf;
COMMIT;
ROLLBACK;
END p_goodsmfprice;
该如何解决呢?求高手解答
------解决方案--------------------
语法不对了:
“ogmpzkfd := c_gmf;”上面那行的“END;”别要了,而且,COMMIT后又ROLLBACK,看你是想做异常处理,但是不是这样做的。你试试:
- SQL code
CREATE OR REPLACE PROCEDURE p_goodsmfprice(vgdid IN VARCHAR2, vmfid IN VARCHAR2, ogmpzkfd OUT VARCHAR2) AS c_gmf dbusrHQ.goodsmfprice@hdqt_db.gmpzkfd%rowtype;BEGIN SELECT distinct gmpzkfd INTO c_gmf FROM dbusrHQ.goodsmfprice@hdqt_db where gmpmfid = vmfid and gmpgdid = vgdid; ogmpzkfd := c_gmf; COMMIT;exception when others then ROLLBACK;END p_goodsmfprice;