Calling procedures at runtime

hi,
if i call a procedure from forms runtime, and if the procedure is a little lengthy, then it takes a few minutes for running,
can i do something to make my procedures to run faster.............
thanks.

Hi Sir,
Oracle Database: 9i release 2
Developer: 6i
O/S: Windows Server 2003 Enterprise Edition
Hardware specs: Dell precision 530, Intel Xeon 2.20 GHz, dual processor, 2 GB Ram.
max of 30,000 characters. so sending some of the tables......
Procedure:
PROCEDURE UPD_FGS_STOCK(P_DATE1 DATE,P_DATE2 DATE)
IS
BEGIN
--DELETE FROM FGS_STK;
--COMMIT;
--OPENINGS
opening balances -----------------
INSERT INTO FGS_STK(cust_type, cust_id,
sticker_id, vehicle_id, product, item_id, opng_bal)
SELECT c.inf1,a.inf4,a.ref3,a.ref2,m.m_desc,a.item_id,SUM(a.qty)
FROM FGS_STOCK_OPENING a,GL_COMPANIES c, MODELS m
where a.inf4=c.company_id(+)
and a.item_id=m.pm_id(+)
and m.m_desc<>'TB'
and tr_date<P_DATE1
group by c.inf1,a.inf4,a.ref3,a.ref2,m.m_desc,a.item_id;
opening receiving direct-------------------
INSERT INTO FGS_STK(cust_type, cust_id,
sticker_id, vehicle_id, product, item_id, opng_rec)
(select h.inf6,h.inf4,h.po_num,h.ref2,m.m_desc,i.item_id,sum(i.rec_qty)
from ic_lines_fgs_temp i, ic_header_fgs_temp h, models m
where h.tr_id=i.tr_id
and i.item_id=m.pm_id(+)
and h.rec_dept_id=90
and h.iss_dept_id=53
and h.inf5='R'
and i.tyre_tube<>'TB'
AND h.tr_date<P_DATE1
group by h.inf6,h.inf4,h.po_num,h.ref2,m.m_desc,i.item_id);
opening receiving Return -------------------
INSERT INTO FGS_STK(cust_type, cust_id,
sticker_id, vehicle_id, product, item_id, opng_rec_ret)
(select h.inf6,h.inf4,h.po_num,h.ref2,m.m_desc,i.item_id,sum(i.rec_qty)
from ic_lines_fgs_temp i, ic_header_fgs_temp h, models m
where h.tr_id=i.tr_id
and i.item_id=m.pm_id(+)
and h.rec_dept_id=90
and h.iss_dept_id=53
and h.inf5='C'
and i.tyre_tube<>'TB'
AND h.tr_date<P_DATE1
group by h.inf6,h.inf4,h.po_num,h.ref2,m.m_desc,i.item_id);
opening receiving REPACKING-------------------
INSERT INTO FGS_STK(cust_type, cust_id,
sticker_id, vehicle_id, product, item_id, opng_rec_pack)
(select h.inf6,h.inf4,h.po_num,h.ref2,m.m_desc,i.item_id,sum(i.rec_qty)
from ic_lines_fgs_temp i, ic_header_fgs_temp h, models m
where h.tr_id=i.tr_id
and i.item_id=m.pm_id(+)
and h.rec_dept_id=90
and h.iss_dept_id=53
and h.inf5='P'
and i.tyre_tube<>'TB'
AND h.tr_date<P_DATE1
group by h.inf6,h.inf4,h.po_num,h.ref2,m.m_desc,i.item_id);
Opening issuance DIRECT ----------
INSERT INTO FGS_STK( cust_type, cust_id,
sticker_id, vehicle_id, product, item_id, opng_iss)
(select c.inf1,h.buyer_id,c.inf2,m.m_desc_for_id,m.m_desc,i.ref_num,sum(i.deliver_qty)
from dcd_temp i, dcm_temp h,gl_companies c,sticker s, models m, vehicles v
where h.dc_id=i.dc_id
AND h.dc_date<P_DATE1
AND h.buyer_id=c.company_id(+)
AND c.inf2=s.sticker_id(+)
AND I.ref_num=M.pm_id(+)
AND M.m_desc_for_id=v.vehicle_id(+)
AND m.m_desc<>'TB'
group by c.inf1,h.buyer_id,c.inf2,m.m_desc_for_id,m.m_desc,i.ref_num);
-- Opening Issuance Transfer --------------
INSERT INTO FGS_STK( cust_type, cust_id,
sticker_id, vehicle_id, product, item_id, opng_iss_indirect)
(SELECT c.inf1,a.iss_dept_id,c.inf2,m.m_desc_for_id,m.m_desc,i.item_id, sum(i.qty)
FROM transfer_header a, transfer_lines i, gl_companies c, sticker s,models m, vehicles v
WHERE i.tr_id=a.tr_id
AND a.tr_date<P_DATE1
AND a.iss_dept_id=c.company_id(+)
AND c.inf2=s.sticker_id(+)
AND i.item_id=m.pm_id(+)
AND m.m_desc_for_id=v.vehicle_id(+)
AND m.m_desc<>'TB'
GROUP BY c.inf1,a.iss_dept_id,c.inf2,m.m_desc_for_id,m.m_desc,i.item_id);
-- Opening Issuance Repacking --------------
INSERT INTO FGS_STK(cust_type, cust_id,
sticker_id, vehicle_id, product, item_id, opng_iss_pack)
(select h.inf6,h.inf4,h.po_num,h.ref2,m.m_desc,i.item_id,sum(i.rec_qty)
from ic_lines_fgs_temp i, ic_header_fgs_temp h, models m
where h.tr_id=i.tr_id
and i.item_id=m.pm_id(+)
and h.iss_dept_id=90
and h.rec_dept_id=53
and h.inf5='P'
and i.tyre_tube<>'TB'
AND h.tr_date<P_DATE1
group by h.inf6,h.inf4,h.po_num,h.ref2,m.m_desc,i.item_id);
-- Opening Receiving Transfer
INSERT INTO FGS_STK( cust_type, cust_id,
sticker_id, vehicle_id, product, item_id, opng_rec_indirect)
(SELECT c.inf1,a.rec_dept_id,c.inf2,m.m_desc_for_id,m.m_desc,i.item_id, sum(i.qty)
FROM transfer_header a, transfer_lines i, gl_companies c, sticker s,models m, vehicles v
WHERE i.tr_id=a.tr_id
AND a.tr_date<P_DATE1
AND a.rec_dept_id=c.company_id(+)
AND c.inf2=s.sticker_id(+)
AND i.item_id=m.pm_id(+)
AND m.m_desc_for_id=v.vehicle_id(+)
AND m.m_desc<>'TB'
GROUP BY c.inf1,a.rec_dept_id,c.inf2,m.m_desc_for_id,m.m_desc,i.item_id);
--CURRENT
current opng balances -----------------
INSERT INTO FGS_STK( cust_type, cust_id,
sticker_id, vehicle_id, product, item_id, opng_bal)
SELECT c.inf1,a.inf4,a.ref3,a.ref2,m.m_desc,a.item_id,SUM(a.qty)
FROM FGS_STOCK_OPENING a,GL_COMPANIES c, MODELS m
where a.inf4=c.company_id(+)
and a.item_id=m.pm_id(+)
and m.m_desc<>'TB'
and tr_date BETWEEN P_DATE1 AND P_DATE2
group by c.inf1,a.inf4,a.ref3,a.ref2,m.m_desc,a.item_id;
current receiving direct (packing)--------------
INSERT INTO FGS_STK( cust_type, cust_id,
sticker_id, vehicle_id, product, item_id, rec)
(select h.inf6,h.inf4,h.po_num,h.ref2,m.m_desc,i.item_id,sum(i.rec_qty)
from ic_lines_fgs_temp i, ic_header_fgs_temp h, models m
where h.tr_id=i.tr_id
and i.item_id=m.pm_id(+)
and h.rec_dept_id=90
and h.iss_dept_id=53
and h.inf5='R'
and i.tyre_tube<>'TB'
AND h.tr_date BETWEEN P_DATE1 AND P_DATE2
group by h.inf6,h.inf4,h.po_num,h.ref2,m.m_desc,i.item_id);
current receiving return from packing--------------
INSERT INTO FGS_STK( cust_type, cust_id,
sticker_id, vehicle_id, product, item_id, rec_ret)
(select h.inf6,h.inf4,h.po_num,h.ref2,m.m_desc,i.item_id,sum(i.rec_qty)
from ic_lines_fgs_temp i, ic_header_fgs_temp h, models m
where h.tr_id=i.tr_id
and i.item_id=m.pm_id(+)
and h.rec_dept_id=90
and h.iss_dept_id=53
and h.inf5='C'
and i.tyre_tube<>'TB'
AND h.tr_date BETWEEN P_DATE1 AND P_DATE2
group by h.inf6,h.inf4,h.po_num,h.ref2,m.m_desc,i.item_id);
current receiving REPACKING--------------
INSERT INTO FGS_STK( cust_type, cust_id,
sticker_id, vehicle_id, product, item_id, rec_pack)
(select h.inf6,h.inf4,h.po_num,h.ref2,m.m_desc,i.item_id,sum(i.rec_qty)
from ic_lines_fgs_temp i, ic_header_fgs_temp h, models m
where h.tr_id=i.tr_id
and i.item_id=m.pm_id(+)
and h.rec_dept_id=90
and h.iss_dept_id=53
and h.inf5='P'
and i.tyre_tube<>'TB'
AND h.tr_date BETWEEN P_DATE1 AND P_DATE2
group by h.inf6,h.inf4,h.po_num,h.ref2,m.m_desc,i.item_id);
current issuance DIRECT (dc)-------
INSERT INTO FGS_STK( cust_type, cust_id,
sticker_id, vehicle_id, product, item_id, iss)
(select c.inf1,h.buyer_id,c.inf2,m.m_desc_for_id,m.m_desc,i.ref_num,sum(i.deliver_qty)
from dcd_temp i, dcm_temp h,gl_companies c,sticker s, models m, vehicles v
where h.dc_id=i.dc_id
AND h.dc_date BETWEEN P_DATE1 AND P_DATE2
AND h.buyer_id=c.company_id(+)
AND c.inf2=s.sticker_id(+)
AND I.ref_num=M.pm_id(+)
AND M.m_desc_for_id=v.vehicle_id(+)
AND m.m_desc<>'TB'
group by c.inf1,h.buyer_id,c.inf2,m.m_desc_for_id,m.m_desc,i.ref_num);
current issuance Transfer -------
INSERT INTO FGS_STK( cust_type, cust_id,
sticker_id, vehicle_id, product, item_id, iss_indirect)
(SELECT c.inf1,a.iss_dept_id,c.inf2,m.m_desc_for_id,m.m_desc,i.item_id, sum(i.qty)
FROM transfer_header a, transfer_lines i, gl_companies c, sticker s,models m, vehicles v
WHERE i.tr_id=a.tr_id
AND a.tr_date BETWEEN P_DATE1 AND P_DATE2
AND a.iss_dept_id=c.company_id(+)
AND c.inf2=s.sticker_id(+)
AND i.item_id=m.pm_id(+)
AND m.m_desc_for_id=v.vehicle_id(+)
AND m.m_desc<>'TB'
GROUP BY c.inf1,a.iss_dept_id,c.inf2,m.m_desc_for_id,m.m_desc,i.item_id);
-- Current Issuance Packing --------------
INSERT INTO FGS_STK(cust_type, cust_id,
sticker_id, vehicle_id, product, item_id, iss_pack)
(select h.inf6,h.inf4,h.po_num,h.ref2,m.m_desc,i.item_id,sum(i.rec_qty)
from ic_lines_fgs_temp i, ic_header_fgs_temp h, models m
where h.tr_id=i.tr_id
and i.item_id=m.pm_id(+)
and h.iss_dept_id=90
and h.rec_dept_id=53
and h.inf5='P'
and i.tyre_tube<>'TB'
AND h.tr_date BETWEEN P_DATE1 AND P_DATE2
group by h.inf6,h.inf4,h.po_num,h.ref2,m.m_desc,i.item_id);
-- current receiving Transfer ------------
INSERT INTO FGS_STK( cust_type, cust_id,
sticker_id, vehicle_id, product, item_id, rec_indirect)
(SELECT c.inf1,a.rec_dept_id,c.inf2,m.m_desc_for_id,m.m_desc,i.item_id, sum(i.qty)
FROM transfer_header a, transfer_lines i, gl_companies c, sticker s,models m, vehicles v
WHERE i.tr_id=a.tr_id
AND a.tr_date BETWEEN P_DATE1 AND P_DATE2
AND a.rec_dept_id=c.company_id(+)
AND c.inf2=s.sticker_id(+)
AND i.item_id=m.pm_id(+)
AND m.m_desc_for_id=v.vehicle_id(+)
AND m.m_desc<>'TB'
GROUP BY c.inf1,a.rec_dept_id,c.inf2,m.m_desc_for_id,m.m_desc,i.item_id);
COMMIT;
END; -- Procedure
table used in the procedure........
CREATE TABLE fgs_stk
(tr_id NUMBER(10,0),
tr_date DATE,
dept_id VARCHAR2(10) DEFAULT 90,
cust_type VARCHAR2(300),
cust_id VARCHAR2(10),
sticker_id NUMBER(9,0),
vehicle_id NUMBER(10,0),
product VARCHAR2(2),
item_id NUMBER(10,0),
opng_bal NUMBER(10,2) DEFAULT 0,
opng_rec NUMBER(10,2) DEFAULT 0,
opng_iss NUMBER(10,2) DEFAULT 0,
rec NUMBER(10,2) DEFAULT 0,
iss NUMBER(10,2) DEFAULT 0,
clsg_bal NUMBER(10,2) DEFAULT 0,
clsg_req NUMBER(10,2) DEFAULT 0,
target NUMBER(10,2) DEFAULT 0,
trgt_rev1 NUMBER(10,2) DEFAULT 0,
trgt_rev2 NUMBER(10,2) DEFAULT 0,
trgt_rev3 NUMBER(10,2) DEFAULT 0,
to_date_dc NUMBER(10,2) DEFAULT 0,
to_date_rec NUMBER(10,2) DEFAULT 0,
rec_indirect NUMBER(10,2) DEFAULT 0,
iss_indirect NUMBER(10,2) DEFAULT 0,
opng_rec_indirect NUMBER(10,2) DEFAULT 0,
opng_iss_indirect NUMBER(10,2) DEFAULT 0,
opng_iss_pack NUMBER(10,2) DEFAULT 0,
iss_pack NUMBER(10,2) DEFAULT 0,
opng_rec_pack NUMBER(10,2) DEFAULT 0,
rec_pack NUMBER(10,2) DEFAULT 0,
rec_ret NUMBER(10,2) DEFAULT 0,
opng_rec_ret NUMBER(10,2) DEFAULT 0)
PCTFREE 10
PCTUSED 40
INITRANS 1
MAXTRANS 255
TABLESPACE system
STORAGE (
INITIAL 65536
MINEXTENTS 1
MAXEXTENTS 2147483645
CREATE TABLE fgs_stock_opening
(tr_id NUMBER NOT NULL,
item_id NUMBER,
qty NUMBER,
tr_date DATE,
ref1 DATE,
ref2 NUMBER(20,0),
ref3 NUMBER(20,0),
books_id NUMBER(9,0) DEFAULT 1 NOT NULL,
inf1 VARCHAR2(100),
inf2 VARCHAR2(100) DEFAULT 'NO' NOT NULL,
inf3 VARCHAR2(300),
inf4 VARCHAR2(10),
inf5 VARCHAR2(300),
inf6 VARCHAR2(300),
remarks VARCHAR2(2000),
reversal VARCHAR2(1) DEFAULT 'N' NOT NULL,
rec_type VARCHAR2(10) DEFAULT 'NA' NOT NULL,
rec_type2 VARCHAR2(10) DEFAULT 'NA' NOT NULL,
rec_status VARCHAR2(10) DEFAULT 'NORMAL' NOT NULL,
rec_active VARCHAR2(1) DEFAULT 'Y' NOT NULL,
rec_printed VARCHAR2(1) DEFAULT 'N' NOT NULL,
rec_posted VARCHAR2(1) DEFAULT 'N' NOT NULL,
system_rec VARCHAR2(1) DEFAULT 'N' NOT NULL,
created_by VARCHAR2(30) DEFAULT USER,
creation_date DATE DEFAULT SYSDATE NOT NULL,
modified_by VARCHAR2(30) DEFAULT USER,
modification_date DATE DEFAULT SYSDATE NOT NULL,
times_modified NUMBER(9,0) DEFAULT 0 NOT NULL)
PCTFREE 10
PCTUSED 40
INITRANS 1
MAXTRANS 255
TABLESPACE system
STORAGE (
INITIAL 65536
MINEXTENTS 1
MAXEXTENTS 2147483645
CREATE TABLE gl_companies
(company_id VARCHAR2(10) NOT NULL,
company_name VARCHAR2(50) NOT NULL,
company_type VARCHAR2(1) DEFAULT 'C',
contact_person VARCHAR2(50),
phone1 VARCHAR2(50),
phone2 VARCHAR2(50),
fax VARCHAR2(50),
gl_acct VARCHAR2(30) DEFAULT 'NA' NOT NULL,
tax_id VARCHAR2(50),
credit_limit NUMBER DEFAULT 0 NOT NULL,
dr_bal NUMBER DEFAULT 0 NOT NULL,
cr_bal NUMBER DEFAULT 0 NOT NULL,
ref1 VARCHAR2(20),
ref2 VARCHAR2(20),
ref3 VARCHAR2(20),
books_id NUMBER(9,0) DEFAULT 1 NOT NULL,
inf1 VARCHAR2(300),
inf2 NUMBER(9,0),
inf3 VARCHAR2(300),
inf4 VARCHAR2(300),
inf5 VARCHAR2(300),
inf6 VARCHAR2(300),
remarks VARCHAR2(2000),
rec_type VARCHAR2(10) DEFAULT 'NA' NOT NULL,
rec_type2 VARCHAR2(10) DEFAULT 'NA' NOT NULL,
rec_status VARCHAR2(10) DEFAULT 'NORMAL' NOT NULL,
rec_active VARCHAR2(1) DEFAULT 'Y' NOT NULL,
rec_printed VARCHAR2(1) DEFAULT 'N' NOT NULL,
rec_posted VARCHAR2(1) DEFAULT 'N' NOT NULL,
system_rec VARCHAR2(1) DEFAULT 'N' NOT NULL,
created_by VARCHAR2(30) DEFAULT USER NOT NULL,
creation_date DATE DEFAULT SYSDATE NOT NULL,
modified_by VARCHAR2(30) DEFAULT USER NOT NULL,
modification_date DATE DEFAULT SYSDATE NOT NULL,
times_modified NUMBER(9,0) DEFAULT 0 NOT NULL,
address VARCHAR2(300),
country_id NUMBER(9,0),
city_id NUMBER(9,0))
PCTFREE 10
PCTUSED 40
INITRANS 1
MAXTRANS 255
TABLESPACE system
STORAGE (
INITIAL 65536
MINEXTENTS 1
MAXEXTENTS 2147483645
CREATE TABLE models
(pm_id NUMBER NOT NULL,
m_num VARCHAR2(80) NOT NULL,
product_id VARCHAR2(2),
m_status VARCHAR2(1),
m_desc VARCHAR2(40),
acc_code VARCHAR2(20),
acc_code_stock VARCHAR2(20),
acc_code_sales VARCHAR2(20),
acc_code_cons VARCHAR2(20),
part_no VARCHAR2(15),
price NUMBER(12,2),
branch_id VARCHAR2(3) DEFAULT 'NA' NOT NULL,
unitms VARCHAR2(4),
m_desc_for VARCHAR2(50),
m_std_wt NUMBER(10,0),
m_num_desc VARCHAR2(100),
m_desc_for_id NUMBER(10,0),
bundle NUMBER(10,0),
pm_id_tyre NUMBER,
pm_id_tube NUMBER,
ref1 DATE,
ref2 NUMBER(20,0) DEFAULT 0,
ref3 NUMBER(10,5) DEFAULT 0,
books_id NUMBER(9,0) DEFAULT 1 NOT NULL,
inf1 VARCHAR2(100),
inf2 VARCHAR2(100) DEFAULT 'NO' NOT NULL,
inf3 VARCHAR2(300),
inf4 VARCHAR2(300),
inf5 VARCHAR2(300),
inf6 NUMBER(10,0),
remarks VARCHAR2(2000),
reversal VARCHAR2(1) DEFAULT 'N' NOT NULL,
rec_type VARCHAR2(10) DEFAULT 'NA' NOT NULL,
rec_type2 VARCHAR2(10) DEFAULT 'NA' NOT NULL,
rec_status VARCHAR2(10) DEFAULT 'NORMAL' NOT NULL,
rec_active VARCHAR2(1) DEFAULT 'Y' NOT NULL,
rec_printed VARCHAR2(1) DEFAULT 'N' NOT NULL,
rec_posted VARCHAR2(1) DEFAULT 'N' NOT NULL,
system_rec VARCHAR2(1) DEFAULT 'N' NOT NULL,
created_by VARCHAR2(30) DEFAULT USER,
creation_date DATE DEFAULT SYSDATE NOT NULL,
modified_by VARCHAR2(30) DEFAULT USER,
modification_date DATE DEFAULT SYSDATE NOT NULL,
times_modified NUMBER(9,0) DEFAULT 0 NOT NULL,
moulds NUMBER(20,0) DEFAULT 0,
output NUMBER(20,0) DEFAULT 0,
mix1_sc_a NUMBER(20,0) DEFAULT 0,
mix1_sc_b NUMBER(20,0) DEFAULT 0,
mix1_sc_c NUMBER(20,0) DEFAULT 0,
mix2_sc_a NUMBER(20,0) DEFAULT 0,
mix2_sc_b NUMBER(20,0) DEFAULT 0,
mix2_sc_c NUMBER(20,0) DEFAULT 0,
mix3_sc_a NUMBER(20,0) DEFAULT 0,
mix3_sc_b NUMBER(20,0) DEFAULT 0,
mix3_sc_c NUMBER(20,0) DEFAULT 0,
wt_m1 NUMBER(20,0) DEFAULT 0,
wt_m2 NUMBER(20,0) DEFAULT 0,
wt_m3 NUMBER(20,0) DEFAULT 0,
clsng_req NUMBER(20,0) DEFAULT 0,
trgt_0 NUMBER(20,0) DEFAULT 0,
trgt_1 NUMBER(20,0) DEFAULT 0,
trgt_2 NUMBER(20,0) DEFAULT 0)
PCTFREE 10
PCTUSED 40
INITRANS 1
MAXTRANS 255
TABLESPACE system
STORAGE (
INITIAL 65536
MINEXTENTS 1
MAXEXTENTS 2147483645
CREATE TABLE ic_header_fgs_temp
(tr_id NUMBER(9,0),
tr_date DATE,
tr_type VARCHAR2(20),
desp_no VARCHAR2(30),
iss_dept_id NUMBER(3,0),
iss_dept_desc VARCHAR2(50),
iss_ref_type VARCHAR2(1),
iss_comp_id VARCHAR2(10),
iss_company_name VARCHAR2(50),
rec_dept_id NUMBER(3,0),
rec_dept_desc VARCHAR2(50),
rec_ref_type VARCHAR2(1),
rec_comp_id VARCHAR2(10),
rec_company_name VARCHAR2(50),
acc_num1 VARCHAR2(30),
acc_num2 VARCHAR2(30),
credit_period VARCHAR2(30),
gl_assets VARCHAR2(30),
gl_sale VARCHAR2(30),
gl_cogs VARCHAR2(30),
gl_cons VARCHAR2(30),
app_id VARCHAR2(2),
inv_num NUMBER(9,0),
inv_date DATE,
po_num NUMBER(9,0),
ref1 DATE,
ref2 NUMBER(20,0),
ref3 NUMBER(20,0),
books_id NUMBER(9,0),
inf1 VARCHAR2(100),
inf2 VARCHAR2(100),
inf3 VARCHAR2(300),
inf4 VARCHAR2(300),
inf5 VARCHAR2(300),
inf6 VARCHAR2(300),
remarks VARCHAR2(2000),
reversal VARCHAR2(1),
rec_type VARCHAR2(10),
rec_type2 VARCHAR2(10),
rec_status VARCHAR2(10),
rec_active VARCHAR2(1),
rec_printed VARCHAR2(1),
rec_posted VARCHAR2(1),
system_rec VARCHAR2(1),
created_by VARCHAR2(30),
creation_date DATE,
modified_by VARCHAR2(30),
modification_date DATE,
times_modified NUMBER(9,0),
outlet_tr_id NUMBER(9,0),
desp_in VARCHAR2(30),
desp_out VARCHAR2(30),
shift VARCHAR2(1),
vehicle VARCHAR2(80),
req_date DATE,
req_no NUMBER)
PCTFREE 10
PCTUSED 40
INITRANS 1
MAXTRANS 255
TABLESPACE system
STORAGE (
INITIAL 65536
MINEXTENTS 1
MAXEXTENTS 2147483645
CREATE TABLE ic_lines_fgs_temp
(tr_id NUMBER(9,0),
sr_no NUMBER(9,0),
item_id NUMBER,
item_desc VARCHAR2(50),
hardware_id VARCHAR2(30),
acc_num1 VARCHAR2(30),
acc_num2 VARCHAR2(30),
qty NUMBER,
cost NUMBER,
price NUMBER,
rate NUMBER,
wh_tax NUMBER,
sales_tax NUMBER,
discount NUMBER,
gs_amount NUMBER,
total_amount NUMBER,
gl_assets VARCHAR2(30),
gl_sale VARCHAR2(30),
gl_cogs VARCHAR2(30),
gl_cons VARCHAR2(30),
app_id VARCHAR2(2),
po_num NUMBER(9,0),
ref1 NUMBER(10,0),
ref2 VARCHAR2(20),
ref3 VARCHAR2(20),
books_id NUMBER(9,0),
inf1 VARCHAR2(300),
inf2 VARCHAR2(300),
inf3 NUMBER(15,0),
inf4 NUMBER(15,0),
inf5 NUMBER(15,0),
inf6 NUMBER(15,0),
remarks VARCHAR2(2000),
reversal VARCHAR2(1),
rec_type VARCHAR2(10),
rec_type2 VARCHAR2(10),
rec_status VARCHAR2(10),
rec_active VARCHAR2(1),
rec_printed VARCHAR2(1),
rec_posted VARCHAR2(1),
system_rec VARCHAR2(1),
created_by VARCHAR2(30),
creation_date DATE,
modified_by VARCHAR2(30),
modification_date DATE,
times_modified NUMBER(9,0),
iss_dept_id VARCHAR2(10),
line_id NUMBER(9,0),
rec_qty NUMBER(*,0),
acc_qty NUMBER(*,0),
rej_qty NUMBER(*,0))
PCTFREE 10
PCTUSED 40
INITRANS 1
MAXTRANS 255
TABLESPACE system
STORAGE (
INITIAL 65536
MINEXTENTS 1
MAXEXTENTS 2147483645
CREATE TABLE dcm_temp
(dc_id NUMBER(15,0) NOT NULL,
buyer_id VARCHAR2(10),
u_id NUMBER(5,0) NOT NULL,
si_id NUMBER(15,0),
dc_num VARCHAR2(15),
dc_date DATE NOT NULL,
remarks VARCHAR2(300),
ref1 VARCHAR2(20),
ref2 VARCHAR2(20),
ref3 VARCHAR2(20),
books_id NUMBER(9,0) NOT NULL,
inf1 VARCHAR2(300),
inf2 VARCHAR2(300),
inf3 VARCHAR2(300),
inf4 VARCHAR2(300),
inf5 VARCHAR2(300),
inf6 VARCHAR2(300),
rec_type VARCHAR2(10) NOT NULL,
rec_type2 VARCHAR2(10) NOT NULL,
rec_status VARCHAR2(10) NOT NULL,
rec_active VARCHAR2(1) NOT NULL,
rec_printed VARCHAR2(1) NOT NULL,
rec_posted VARCHAR2(1) NOT NULL,
system_rec VARCHAR2(1) NOT NULL,
created_by VARCHAR2(30) NOT NULL,
creation_date DATE NOT NULL,
modified_by VARCHAR2(30) NOT NULL,
modification_date DATE NOT NULL,
times_modified NUMBER(9,0) NOT NULL,
so_id NUMBER(15,0))
PCTFREE 10
PCTUSED 40
INITRANS 1
MAXTRANS 255
TABLESPACE system
STORAGE (
INITIAL 65536
MINEXTENTS 1
MAXEXTENTS 2147483645
CREATE TABLE dcd_temp
(dcd_id NUMBER(15,0) NOT NULL,
dc_id NUMBER(15,0) NOT NULL,
ref_num NUMBER(7,0),
prd_qty NUMBER(7,0) NOT NULL,
otype VARCHAR2(1),
oem_prd VARCHAR2(1),
ref1 NUMBER(10,2),
ref2 VARCHAR2(20),
ref3 VARCHAR2(20),
books_id NUMBER(9,0) NOT NULL,
inf1 VARCHAR2(300),
inf2 VARCHAR2(300),
inf3 VARCHAR2(300),
inf4 VARCHAR2(300),
inf5 VARCHAR2(300),
inf6 VARCHAR2(300),
remarks VARCHAR2(2000),
rec_type VARCHAR2(10) NOT NULL,
rec_type2 VARCHAR2(10) NOT NULL,
rec_status VARCHAR2(10) NOT NULL,
rec_active VARCHAR2(1) NOT NULL,
rec_printed VARCHAR2(1) NOT NULL,
rec_posted VARCHAR2(1) NOT NULL,
system_rec VARCHAR2(1) NOT NULL,
created_by VARCHAR2(30) NOT NULL,
creation_date DATE NOT NULL,
modified_by VARCHAR2(30) NOT NULL,
modification_date DATE NOT NULL,
times_modified NUMBER(9,0) NOT NULL,
color VARCHAR2(50),
prd_rate NUMBER(10,2) NOT NULL,
deliver_qty NUMBER(10,0))
PCTFREE 10
PCTUSED 40
INITRANS 1
MAXTRANS 255
TABLESPACE system
STORAGE (
INITIAL 65536
MINEXTENTS 1
MAXEXTENTS 2147483645
/

Similar Messages

  • How to Call Procedure or Function

    Hi,
    How to call a procedure or function in apex, Please let me know
    Thanks
    Sudhir

    Hi,
    This post might help
    Re: How to Call procedure In Processes
    Regards,
    Jari

  • Getting NLS setting issues when calling procedure

    Hi,
    Can anybody suggest me what could the problem in the below issue?.
    i am invokeing procedure using DBAdapter. My soa version is 11.1.1.5. When i am calling procedure first time it is working fine. But when i am invoke second time
    it is showing below error. I observed that i am getting error alternativly. So kinldy advice me what could be the issue.
    Error:
    Cause: java.sql.SQLException: ORA-20001: Oracle error -20001: ORA-20001: Oracle error -2074: ORA-02074: cannot SET NLS in a distributed transaction has been detected in fnd_global.set_nls.set_parameter('NLS_LANGUAGE','AMERICAN'). has been detected in fnd_global.set_nls. ORA-06512: at "APPS.APP_EXCEPTION", line 72 ORA-06512: at "APPS.FND_GLOBAL", line 240 ORA-06512: at "APPS.FND_GLOBAL", line 1410 ORA-06512: at "APPS.FND_GLOBAL", line 1655 ORA-06512: at "APPS.FND_GLOBAL", line 2171 ORA-06512: at "APPS.FND_GLOBAL", line 2313 ORA-06512: at "APPS.FND_GLOBAL", line 2251 ORA-06512: at
    Regards,
    Adhi

    Hi:
    Another way to avoid this, is to use an Non-XA Datasource.
    Hope this helps
    best

  • How I call procedure  in interactive report??

    Hi
    Is possible that call procedure in interactive report on APEX?
    Because
    in region source it asked only sql statement so I am confused and I dont know how call procedure in interactive report ?
    Edited by: esra aktas on 12.May.2011 11:04
    Edited by: esra aktas on 12.May.2011 12:05

    I am confused... Now, acoording to my senior porject in school my advisor want to that lots of procedures' name and arguments that I have collect them in a table. I collected procedures in table then I wrote a procedure that call wanted procedure by using dynamic sql and run that procedure..I select procedure name on selectlist on apex then that procedure run.
    So I want to my procedure's results must be as dataset in report . But report's source want to sql statement but I want to call the procedure as I mentioned.
    If you have any idea about my situations , I want to get your adviced.
    I have a this procedure.
    create or replace
    PROCEDURE CALLSPFROMTABLE(id number,arg1 varchar2,arg2 varchar2)  as
    table_name varchar2(30):='procedures';
    procname varchar2(1000);
    begin
    EXECUTE IMMEDIATE 'select procname from ' || table_name || ' where id='||id into procname;
    EXECUTE IMMEDIATE 'BEGIN '||procname||'('||arg1||','||arg2||'); END;';
    END;id=>:p1_SP , arg1=>:P1_YIL arg2=>:P1_BIRIM from selectlists
    Edited by: esra aktas on 12.May.2011 13:08
    Edited by: esra aktas on 12.May.2011 13:17

  • How to debug Stored Procedures on Runtime?

    Is there any way or any tool available using which I could debug stored procedures on runtime ? Please also pass the links if you know any.

    Check out the PL/SQL Developer tool:
    http://www.allroundautomations.nl/plsqldev.html
    You can download a fully functional version for a 30 day trial. Much less expensive than TOAD, and better yet, it actually works (the TOAD PL/SQL debugger in version 8 is so buggy as to render it useless)

  • Call procedure while creating view in hana.

    Can we call procedure while creating a attribute view like
    CREATE VIEW "PAYROLLDBTEST"."@HourTransactionView"
    "DocEntry",
    "DocNum",
    "EmpID",
    "EmpCode",
    "FullName",
    "TableName",
    "TranName",
    "U_FromDate",
    "U_ToDate",
    "NoOfDays",
    "U_FromTime",
    "U_ToTime",
    "NoOfHours",
    "OvertimeHours",
    "UnpaidDays",
    "Weekends",
    "Holidays",
    "U_Remarks",
    "U_BatchNo",
    "ProjectCode"
    ) AS SELECT
      T0."DocEntry" AS DocEntry,
        T0."DocNum" AS DocNum,
       T0."U_EmpCode" AS EmpID,
    CALL PAYROLLDBTEST.GetEmpCodeFromEmployeeID('EmpID')  ,              (getting syntax error here).
        GetEmployeeFullName("@TRANSACTION_HOURS".U_EmpCode) AS FullName,
          T0."U_TransactionType" AS TranCode,
        GetHourTableName("U_TransactionType") AS TableName,
         GetHourTransactionName("U_TransactionType") AS TranName,
        T0."U_FromDate",
        T0. "U_ToDate",
          DAYS_BETWEEN("U_FromDate", "U_ToDate") + 1 AS NoOfDays,
          T0."U_FromTime" AS U_FromTime,
           T0."U_ToTime" AS U_ToTime,
        IFNULL("U_WorkHours", 0) AS NoOfHours,
         IFNULL("U_OvertimeHours", 0) AS OvertimeHours,
        IFNULL("U_PaidDays", 0) AS PaidDays,
         IFNULL("U_UnpaidDays", 0) AS UnpaidDays,
        IFNULL("U_WeekendsCount", 0) AS Weekends,
         IFNULL("U_HolidaysCount", 0) AS Holidays,
          T0."U_Remarks",
           T0."U_BatchNo",
        T0."U_ProjectCode" AS "ProjectCode"
        FROM
        "@TRANSACTION_HOURS" T0
        INNER JOIN
        "OHEM" T1
        ON
         T1."empID" = T0."U_EmpCode";

    Hello,
    The problem could be a SAPGUI related problem... Whats the current sapgui patch level ? Does it work when you try on another wokstation with the same user ?
    Could you please use SAPGUI 720 and update your patch level to 7 ? Then check the behaviour again.
    Best regards
    Rene

  • Why do we call an ABAP Runtime error a "Short Dump"

    Hi All,
    I was just working on one of the ABAP runtime errors with my technical counterpart and a question came to my mind "Why do we call an ABAP Runtime error a "Short Dump"?".
    I tried asking a few friends of mine working in the technical space in SAP and they were not able to answer.
    So, some one of you experts help me getting answer to this question.
    Thanks in Advance.
    Nitin.

    ABAP Runtime error is a generalized term .......... meaning the error occured while runtime.
    wheare as short dump.
    Short -  means brief.
    dump - error information from the memory
    Short dumps (also called ABAP memory dumps). Short dumps occur when an ABAP program fails.
    Short dumps provide basic information about which program failed and what the error was.
    hope this helps.

  • Exception handling in calling procedure

    Hi,
    i have a package where currently am making calls to private procedures from public procedure.
    and the senario is:-
    create package body p_tst
    is
    ex_failed exception;
    -- this is private proc
    procedure p_private
    is
    begin
    raise ex_failed;
    exception
    when ex_failed
    then
    raise;
    end p_private;
    procedure p_public
    is
    begin
    -- nomaking call to private
    -- procedure
    p_private;
    -- here i need to catch
    -- the raised exception
    -- passed from the called
    -- procedure
    when ex_failed
    end p_public;
    end;
    basically i want to catch the exception being passed from called procedure to calling procedure, and raise the same exception in calling procdure.
    is it possible to catch the same exception in the calling procedure?

    Yes, you can catch the same exception in the calling procedure, exceptions are propagated to the caller if they are not handled in the called procedure.
    Is this what you are trying to do?
    CREATE OR REPLACE PACKAGE p_tst
    AS
       PROCEDURE p_public;
       ex_failed   EXCEPTION;
    END;
    CREATE OR REPLACE PACKAGE BODY p_tst
    IS
       PROCEDURE p_private
       IS
       BEGIN
          RAISE ex_failed;
       END p_private;
       PROCEDURE p_public
       IS
       BEGIN
          p_private;
       EXCEPTION
          WHEN ex_failed
          THEN
             DBMS_OUTPUT.put_line ('error');
       END p_public;
    END;
    SQL> set serveroutput on;
    SQL> exec p_tst.p_public;
    error
    PL/SQL procedure successfully completed.

  • How to call procedure in Java from SQL Server Database

    Hello Every Body
    i Have Question about
    How to call procedure in Java from SQL Server Database
    Thanks

    Hi,
    have you tried a Google search? I just gave it a 3 second try and already found: http://stackoverflow.com/questions/6113674/how-do-i-execute-a-ms-sql-server-stored-procedure-in-java-jsp-returning-table-d
    Frank

  • How to call procedure from java

    My database : oracle xe 10g
    I develop my application by use jdeveloper
    I call procedure following code :
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection c = (Connection)DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "shm", "shm");
    CallableStatement cs = c.prepareCall("begin shm_increase_capital.ins_upd_tb_payment_rec_pc(:1,:2,:3,:4,:5,:6,:7);end;");
    cs.setLong(1, shareHolderId);
    cs.setString(2, companyCode);
    cs.setString(3, lotYear);
    cs.setLong(4, seqLot);
    cs.setLong(5, allocateId);
    cs.setLong(6, originateFrom);
    cs.setString(7, curUser);
    cs.execute();
    cs.close();
    c.close();
    When I run my application several times I found error :
    Exception in thread "main" java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12519, TNS:no appropriate service handler found
    The Connection descriptor used by the client was:
    localhost:1521:XE
    Do you have another way for call procedure
    Please recommend me
    Thank you,
    Ja-ae

    I can call procedure
    but when I using my application too long
    I found error :
    Exception in thread "main" java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12519, TNS:no appropriate service handler found
    The Connection descriptor used by the client was:
    localhost:1521:XE
    so, I think perhaps another way to call procedure for avoid this error

  • PLS HELP - Column value missing when calling procedure from Oracle OLEDB provider

    When calling procedure 'sp_a(?,?,?)' from SQL_PLUS and using
    DBMS.OUTPUT to print the result
    It returns a result set as
    C0, C1, C2
    But When I call the same procedure 'sp_a(?,?,?)' with same
    parameter value from MS VB6,
    It returns the a result set as
    C0, Null,C2
    The 2nd value became Null.
    Any ideas?
    Please Help.

    See http://oracle.ittoolbox.com/groups/technical-functional/oracle-apps-l/forms-personalization-execute-a-procedure-1778674

  • Call procedure when add item

    Hello,
    Is any way to call procedure when you add and item in oracle portal (not after)? Example when you add a item text and you see the form to add all content is any way to call a procedure in this form?
    Thanks
    Edited by: user533544 on 6/Abr/2009 2:12

    Hi Orlando -
    In the next major portal release this functionality will be available. We call it the Content Management Event Framework. This event framework lets you react on any event that happens in your portal CM system.
    In the current release, you can implement a workaround by using database triggers on the Content Management (CM) views/tables. The CM views are documented here: http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc1012/wwsbr_api_view.html
    Hope this helps,
    Candace

  • Call procedure without specifcation from shell scrip

    I am writing shell script. In that I am calling one of the procedure lets say "ABC" from package "V".
    exec V.abc ();
    problem is that procedure ABC does not have specifications in package. It has only body defined.
    I am getting error as procedure undefined.
    Is there any way to call procedure in the BODY part without specifications.
    Problem here is package is not owned by me so I can not change anything in that .
    Please suggest.
    Thanks in advance.

    No, the procedure is private in the package body. You can't access it if it is not in the package specification.
    Ask the owner of the package to declare it in the package specification, make it public...
    How do you know that this procedure exists anyway?

  • Call procedure within procedure

    Hai
    I have some question
    1)
    This below procedure create user at run time
    ============================================
    create or replace procedure new_u1( p_name in varchar2,
    p_pw in varchar2,
    p_def_tblspace in varchar2 default 'users' )
    as
    begin
    execute immediate 'create user ' || P_name || ' identified by ' ||
    p_pw || ' default tablespace ' || p_def_tblspace ||
    ' temporary tablespace temp';
    execute immediate 'grant create session to ' || p_name;
    end;
    This below procedure create tables at run time
    ==============================================
    create or replace procedure M2 (table_name varchar2) as
    cursor1 integer;
    begin
    cursor1 := dbms_sql.open_cursor;
    dbms_sql.parse(cursor1, 'DROP TABLE ' || table_name,
    dbms_sql.v7);
    dbms_sql.close_cursor(cursor1);
    end;
    I want ,when first procedure calls ,it calls second procedure and create tables in that schema (call procedure within procedure).How to do that?
    2)What is diffrenece between row and statement level trigger?how many types of triggers?
    3)what is mutating trigger or table?
    4)dbms_stats.gather_table_stats package it collects the statistics about the tables .I want statistics to be collected at every day 9am and 7pm how to do that?
    Thanks in advance
    Mohan

    You could use an expression like this, to generate the run times:
    SQL> create table times (dt date) ;
    Table created.
    SQL> BEGIN
      2      FOR idx IN 1 .. 24
      3      LOOP
      4          INSERT INTO times VALUES (trunc(SYSDATE) + (idx / 24));
      5          INSERT INTO times VALUES (trunc(SYSDATE) + (idx / 24) + (1 / (24 * 60)));
      6          INSERT INTO times VALUES (trunc(SYSDATE) + (idx / 24) + (59 / (24 * 60)));
      7      END LOOP;
      8  END;
      9  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> SELECT to_char(dt,
      2                 'dd-mon-yyyy hh:mi:ss AM'),
      3         to_char(decode(sign(to_number(to_char(dt,
      4                                               'hh24MI')) - 900),
      5                        -1,
      6                        trunc(dt) + (9 / 24),
      7                        0,
      8                        trunc(dt) + (9 / 24),
      9                        decode(sign(to_number(to_char(dt,
    10                                                      'hh24MI')) - 1900),
    11                               -1,
    12                               trunc(dt) + (19 / 24),
    13                               0,
    14                               trunc(dt) + (19 / 24),
    15                               trunc(dt) + 1 + (9 / 24))),
    16                 'dd-mon-yyyy hh:mi:ss AM')
    17  FROM   times
    18  ORDER  BY dt
    19  /
    TO_CHAR(DT,'DD-MON-YYYY TO_CHAR(DECODE(SIGN(TO_
    01-jan-2004 01:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 01:01:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 01:59:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 02:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 02:01:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 02:59:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 03:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 03:01:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 03:59:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 04:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 04:01:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 04:59:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 05:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 05:01:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 05:59:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 06:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 06:01:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 06:59:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 07:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 07:01:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 07:59:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 08:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 08:01:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 08:59:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 09:00:00 AM 01-jan-2004 09:00:00 AM
    01-jan-2004 09:01:00 AM 01-jan-2004 07:00:00 PM
    01-jan-2004 09:59:00 AM 01-jan-2004 07:00:00 PM
    01-jan-2004 10:00:00 AM 01-jan-2004 07:00:00 PM
    01-jan-2004 10:01:00 AM 01-jan-2004 07:00:00 PM
    01-jan-2004 10:59:00 AM 01-jan-2004 07:00:00 PM
    01-jan-2004 11:00:00 AM 01-jan-2004 07:00:00 PM
    01-jan-2004 11:01:00 AM 01-jan-2004 07:00:00 PM
    01-jan-2004 11:59:00 AM 01-jan-2004 07:00:00 PM
    01-jan-2004 12:00:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 12:01:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 12:59:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 01:00:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 01:01:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 01:59:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 02:00:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 02:01:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 02:59:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 03:00:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 03:01:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 03:59:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 04:00:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 04:01:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 04:59:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 05:00:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 05:01:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 05:59:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 06:00:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 06:01:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 06:59:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 07:00:00 PM 01-jan-2004 07:00:00 PM
    01-jan-2004 07:01:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 07:59:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 08:00:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 08:01:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 08:59:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 09:00:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 09:01:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 09:59:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 10:00:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 10:01:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 10:59:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 11:00:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 11:01:00 PM 02-jan-2004 09:00:00 AM
    01-jan-2004 11:59:00 PM 02-jan-2004 09:00:00 AM
    02-jan-2004 12:00:00 AM 02-jan-2004 09:00:00 AM
    02-jan-2004 12:01:00 AM 02-jan-2004 09:00:00 AM
    02-jan-2004 12:59:00 AM 02-jan-2004 09:00:00 AM
    72 rows selected.
    SQL>

  • Call procedure across schema

    I have oracle 8i
    i have multiple identical schema for different country.
    i write one procedure in one schema(country_1) and granted to all others for execute.
    now i am connected to country_2 which doesn't have procedure,
    and i am calling procedure of country_1(which has a procedure).
    upto this everything is fine
    but problem is i want to
    execute the procedure on the recently connected schema(country_2),it is executing on country_1(where actual procedure is )
    Thanks,
    prathesh
    ([email protected])

    You need to add AUTHID CURRENT_USER to your create procedure command.
    From the documentation
    invoker_rights_clause
    The invoker_rights_clause lets you specify whether the procedure executes with the privileges and in the schema of the user who owns it or with the privileges and in the schema of CURRENT_USER.
    This clause also determines how Oracle resolves external names in queries, DML operations, and dynamic SQL statements in the procedure.
    TTFN
    John

Maybe you are looking for