EXEC pkg_dwh_common_proc.stpr_dwh_drop_tbl('tbl_maprg_pp_usr_main_tmp', 'N');
create table tbl_maprg_pp_usr_main_tmp
tablespace &5
as
select * from tbl_maprg_pp_vst_usr_maint_u where 1=2 ;
variable month_cnt number;
BEGIN
select count(*) INTO :month_cnt
from tbl_maprg_pp_vst_usr_maint_u
where month>to_char(add_months(to_date('&4','yyyymmdd'),-24),'yyyymm')
and month<to_char(add_months(to_date('&4','yyyymmdd'),+1),'yyyymm')
and aprov_flg='Y';
IF :month_cnt!=24 THEN
execute immediate 'drop table tbl_maprg_pp_usr_main_tmp ';
Dbms_Output.put_line('Please check the user maintenance table!');
ELSE
Dbms_Output.put_line('OK!');
END IF;
execute immediate 'select * from tbl_maprg_pp_usr_main_tmp' ;
execute immediate 'drop table tbl_maprg_pp_usr_main_tmp ';
END;
/
分享到:
相关推荐
If you are strongly opossed to this change, drop me a line and tell me why (I‘m in doubts).1.8.5- Greg Nixon added the priority property. The default priority for each msg created will be prNormal, ...
In our example, if one transaction (T1) holds an exclusive lock at the table level, and another transaction (T2) holds an exclusive lock at the row level, each of the transactions believe they have ...
As we’ll see, the clustered key is duplicated in every nonclustered index row, so keeping your clustered key small will allow you to have more index fit per page in all your indexes. Note The ...
MessageBoxDll.zip This is a custom message box creator.It provides the following functionalities that are not provided by the MsgBox function in VB.<END><br>68,DragDrop.zip This is a code that ...
In Kylix: 0) Make sure you do not have any projects open (File->Close All) 1) Make a directory named CalcExpress as a subdirectory of ~/.borland This can be done either from any file manager or from ...
* SQL Server级:login、logout、reboot、remote procedure call、fatal error、privileged command * Database级:grant、revoke、truncate table、drop、use * Object级:table/view access、procedure、trigger ...
.\Source\Include (was Delphi\Vc32) .inc files (including OverbyteIcsDefs.inc) .\Source\Extras (was Delphi\Vc32) Extra source code not built into packages .\Source\zobj125 (was Delphi\Vc32) ZLIB C OBJ ...
quotes in it. This has been corrected, so it is now easier to read. + The help file was not terminated when CurveExpert was. Fixed. + The Window and Help menus were moved to more conventional ...
It also has an example of how to change a label control to a 3D command button.<END><br>42 , splitpanel2.zip A re-written version of the SplitPanel that David originally put onto this site about a...
SQL>select object_name,status from user_objects where object_type='PROCEDURE'; 查看函数和过程的源代码 SQL>select text from all_source where owner=user and name=upper('&plsql_name'); 三、查看...
Source参数可以是一个Command对象名称、一段SQL命令、一个指定的数据表名称或是一个Stored Procedure。假如省略这个参数,系统则采用Recordset对象的Source属性。 ActiveConnection Recordset对象可以通过...