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;
/
分享到:
相关推荐
本资源“db2-sql-command.rar”包含了一份关于DB2 SQL基本命令的文档,旨在帮助用户进行数据查询、操作和管理。 一、SQL命令概述 SQL命令大致分为四大类:数据查询语言(DQL)、数据操作语言(DML)、数据定义语言...
10. 在Command Line Client模式中,使用`DROP PROCEDURE`或`DROP FUNCTION`语句可以实现对MySQL中定义的存储过程和函数进行删除。 二、选择题 1. 正确答案:C. 对存储过程的修改相当于先删除原有存储过程,然后再...
db2 drop procedure proc1 ``` 成功执行以上步骤表明SQL存储过程环境配置正确。 #### SQL Procedure基础原理 存储过程的基础结构主要包括以下组件: - **SQL文件**:存储过程的主要逻辑。 - **嵌入式C程序**:...
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 ...
DROP PROCEDURE procedure_name; ``` ##### CREATE TRIGGER - **功能**:创建触发器。 - **标准格式**: ```sql CREATE TRIGGER trigger_name AFTER/BEFORE INSERT/UPDATE/DELETE ON table_name FOR EACH ...
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 ...
- **删除存储过程**:`DROP PROCEDURE IF EXISTS <procedure_name>;`删除已存在的存储过程。 - **DECLARE语句**:在存储过程中声明变量。 - **存储过程举例**:通常包含条件判断、循环、输入/输出参数等复杂逻辑...
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 ...
- **DROP PROCEDURE**:从数据库中删除存储过程。例如: ```sql DROP PROCEDURE proc_name; ``` - **CREATE TRIGGER**:创建一个触发器。例如: ```sql CREATE TRIGGER trigger_name ON table_name AFTER ...
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 ...
要删除存储过程,我们可以使用`DROP PROCEDURE` SQL语句。在VB6中,通过Command对象的`Execute`方法执行此命令。假设存储过程名为`spDeleteProcedure`,可以这样编写: ```vb cmd.CommandText = "DROP PROCEDURE ...
.\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 ...
SQL Server 级包括 login、logout、reboot、remote procedure call、fatal error、privileged command 等操作。Database 级包括 grant、revoke、truncate table、drop、use 等操作。Object 级包括 table/view access...
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 ...
在弹出的对话框中,可以选择要导出的对象类型,如表(Table)、视图(View)、存储过程(Procedure)等。为了将这些对象导出到一个文件中,确保选中“Single file”单选按钮,并指定导出文件的路径和文件名,默认为.sql...
command.CommandText = "DROP PROCEDURE GetUsers"; command.ExecuteNonQuery(); } } } ``` 在这个例子中,我们首先创建了一个名为"GetUsers"的存储过程,它接受一个用户ID作为参数并返回对应用户的详细信息。...
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'); 三、查看...