I'd like to be able to replace some views using a single SP call.
I thoght the syntax was just :
PROCEDURE CreateViews AS
BEGIN
CREATE OR REPLACE VIEW DB2_FDBCLI ( CLRACI, CLPRNM, CLNOM, CLTLPH, CLTLFX,
CLTYPE, CLDTOU, CLDTAN, CLETAT, CLGERA, CLGER2, CLGRPE ) AS
SELECT LRACI,CLPRNM,CLNOM,CLTLPH,CLTLFX,CLTYPE,CLDTOU,CLDTAN,
CLETAT,CLGERA,CLGER2,CLGRPE
from olyftch.FDBCLI@esdev01.db2;
CREATE OR REPLACE VIEW DB2_FDBTAB ( TBID, TBCODE)
AS SELECT TBID, TBCODE from olyftch.FDBCLI@esdev01.db2;
END CreateViews;
but this give the compilation error:
PLS-00103: Encountered the symbol "CREATE" when expecting one of the following:
begin declare exit for goto if loop mod null pragma raise
return select update while <an identifier>
<a double
Can someone please help.
Thanks Bill Paton
william.paton@ubsw.com
Check out
I thoght the syntax was just :
PROCEDURE CreateViews AS
BEGIN
CREATE OR REPLACE VIEW DB2_FDBCLI ( CLRACI, CLPRNM, CLNOM, CLTLPH, CLTLFX,
CLTYPE, CLDTOU, CLDTAN, CLETAT, CLGERA, CLGER2, CLGRPE ) AS
SELECT LRACI,CLPRNM,CLNOM,CLTLPH,CLTLFX,CLTYPE,CLDTOU,CLDTAN,
CLETAT,CLGERA,CLGER2,CLGRPE
from olyftch.FDBCLI@esdev01.db2;
CREATE OR REPLACE VIEW DB2_FDBTAB ( TBID, TBCODE)
AS SELECT TBID, TBCODE from olyftch.FDBCLI@esdev01.db2;
END CreateViews;
but this give the compilation error:
PLS-00103: Encountered the symbol "CREATE" when expecting one of the following:
begin declare exit for goto if loop mod null pragma raise
return select update while <an identifier>
<a double
Can someone please help.
Thanks Bill Paton
william.paton@ubsw.com
Check out