存储过程

Create or replace procedure processGCFloatBlance (IN tempFormCode nvarchar(60),in tempFormTitle nvarchar(60),in tempNewTableName nvarchar(60),in tempNewSubjectCode nvarchar(60))
as
v_sql1 VARCHAR(1024);
begin
v_sql1 := 'CREATE column table MD_ORG_BAK as (select * from MD_ORG where code= '''|| :tempFormCode || ''' )';
EXEC :v_sql1;
end;

Create or replace procedure processGCFloatBlance (IN tempFormCode nvarchar(60),in tempFormTitle nvarchar(60),in tempNewTableName nvarchar(60),in tempNewSubjectCode nvarchar(60))
as
begin
CREATE column table MD_ORG_BAK as (select * from MD_ORG where 1=2 );
INSERT INTO MD_ORG_BAK SELECT * FROM MD_ORG where code= :tempFormCode;
end;
call processGCFloatBlance('GL000000202001271H1','其他应收款明细表','GC_FLOATBALANCEQYSK','1161');

posted @ 2020-12-29 16:35  可控核聚变  阅读(53)  评论(0)    收藏  举报