日期:2014-05-17 浏览次数:20823 次
create or replace procedure sp_OCN_Alarm(import_Date in date,v_t_step1 in varchar2(50))
as
v_sql varchar2(4000);
begin
/*v_t_step1:='V_STEP1';
import_Date:=to_date('2012-04-01','yyyy-mm-dd');*/
/************************************************************/
/**获取 temp_t_customer 表数据 **/
/************************************************************/
v_sql:='
insert into temp_t_customer(INSERT_MONTH,Userid,customerid,cust_name,address_detail,telephone1,telephone2,custdistrictid)
select
'||to_char(import_Date,'yyyymm')||' as INSERT_MONTH,
'||to_char(import_Date,'yyyymm')||'||a.CustomerID,
a.CustomerID ,
a.name ,
a.custdetailaddress,
a.telephone as TELEPHONE1,
a.telephonemobile as TELEPHONE2,
a.custdistrictid
from boss2.t_customer'||to_char(import_Date,'yyyymm')||' a';
execute immediate v_sql;
end sp_OCN_Alarm;
ORA-06550: line 5, column 9:
PLS-00905: object OCN.SP_OCN_ALARM is invalid
ORA-06550: line 5, column 9:
PL/SQL: Statement ignored
create or replace procedure sp_OCN_Alarm(import_Date in date,v_t_step1 in varchar2(50)) /*应该使用*/ create or replace procedure sp_OCN_Alarm(import_Date in date,v_t_step1 in varchar2)
------解决方案--------------------
v_t_step1 in varchar2(50)参数定义错了,定义参数不需要定义长度大小