SQL & PL/SQL :: Oracle - Getting Error While Writing Procedure?

May 3, 2012

I am Getting the error when writing the procedure. How to Solve this Error .

Error: PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'

View 5 Replies


ADVERTISEMENT

SQL & PL/SQL :: Difference Behind Using Of Either IS Or AS When Writing Stored Procedure?

Mar 10, 2011

Is there any difference behind that using of either IS or AS when writing Stored Procedure?

View 1 Replies View Related

Writing A PLSQL Procedure To Housekeep Files?

May 22, 2007

I am trying to implement a Houskeeping program for files generated in 4 different servers. This housekeeping program is run as a batch job and I need to use PLSQL to implement it. The files need to be housekept on the basis of the file creation date.

how I can go about doing this using a PLSQL stored procedure.

View 3 Replies View Related

Prevent Other Sessions From Writing To The Tables In Procedure?

Jun 26, 2013

here' my code.

delimiter //
SELECT CONNECTION_ID()//
LOCK TABLES source.jos_daikin_control_card_fcu_model WRITE//

[Code].....

ERROR 1192 (HY000): Can't execute the given command because you have active lock
ed tables or an active transaction

Is there a way to prevent other session from accessing the tables called in the procedure?

View 3 Replies View Related

SQL & PL/SQL :: Writing A Procedure For Updating Table2 Based On Table3?

Sep 14, 2011

In my application i have a requirement as follows.I have 3 tables table1,table2,table3.I have 4 tickets for one license number which is related to client table as follows.

table1
=====
license_nbr(pk) name address
=============== ===== =======
LicNo1 test testing

Table2
=====
ticket number(pk) amountto be paid balance_amount license_nbr(fk table2)
tk1 200 200 0 LicNo1
tk2 300 300 0 LicNo1
tk3 400 400 0 LicNo1
tk4 500 500 400 LicNo1

table3
=====
payment table
ticket_number(fk table2) amount paid payment status license_nbr(fk table1)
tk1 1000 excess paid. LicNo1

so now the excess paid amount to be adjusted for the remaining tickets through tk2 to tk4.and only tk4 should remain with 400 the balance amount should be updated accordinglyand i have a license number which is a foreignkey of client table. writing a procedure for updating the table2 based on the table3.

View 14 Replies View Related

SQL & PL/SQL :: Writing Procedure In User 2 Schema Accessing Table Product - Not Compiled?

Dec 17, 2010

I have got 2 users as user1 and user2.I have used the following statements from user 'user1':

create role GENEVAOBJECTS;
grant select, insert, update, delete on PRODUCT to GENEVAOBJECTS;
grant GENEVAOBJECTS to user2;

In the above statements, product is a table. Now, I could able to access this table from user 'user2'. But however if I write a procedure in user2 schema accessing the table product, then the procedure is not getting compiled.

create or replace procedure test_prc as
v_test number(9);
begin
select product_id into v_test
from PRODUCT where rownum=1;

[code]...

why I cannot access that table from procedure?

View 8 Replies View Related

Forms :: 10g Error In Writing To Directory

Apr 12, 2006

I'm trying to install forms 10g on my windows 2000 professional os which is having oracle 9i client. but while installing 10g i'm geting oracle universal installer error. error in writing to directory c:...

My D drive is having 10GB free space and C drive is having 800MB free space (both drive have normal attribute i.e it's not read only ) and oracle have already copied some temp files in C drive (size 13.6 MB) .

View 7 Replies View Related

SQL & PL/SQL :: Writing A Join In Oracle 11g?

May 1, 2013

I have to do a query in oracle 11g

i want to cumpute the percentage of believers of every religion from the world's population

country:name,code,population

example data "Argentina" "ar" "39144753"

religion:country,name,percentage
example data
ar Jewish 2
ar Protestant 2
ar Roman Catholic 92

View 12 Replies View Related

Getting Error While Trying To Debug Procedure In Oracle SQL Developer

Apr 16, 2012

I tried to debug the procedure in Oracle SQL Developer and got the below error,

Connecting to the database TEST.
Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '****', '4000' )
ORA-30683: failure establishing connection to debugger
ORA-12535: TNS:operation timed out
ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
ORA-06512: at line 1
Process exited.
Disconnecting from the database TEST.

Here,

TEST is my database name,
**** is IP address of my local machine
4000 is the port number, also I have set the debug port range as 4000 - 4999 in SQL DEVELOPER.
firewall is not enabled in my machine.

View 2 Replies View Related

Oracle Database Writing Slow?

Dec 31, 2011

We are using one software it is a test tool for verify the data base posting speed from server to client systems. In windows 2008 R2, database posting speed is very slow when compare to windows 2003 server .

Server configuration is same for both servers ( RAID 5 , RAM 4 GB) how we can improve writing performance in Oracle

View 1 Replies View Related

SQL & PL/SQL :: ORACLE Error 6550 In FDPSTP - Run Parallel All Procedure

Feb 15, 2012

I am creating a package. In case my package, i am want to run parallel all procedure(FillAndSend_IM1,FillAndSend_IM2,FillAndSend_IM3,FillAndSend_IM4 ) .

in package i using dbms_job.submit,

dbms_job.submit( l_job, 'FillAndSend_IM1;' );
dbms_job.submit( l_job, 'FillAndSend_IM2;' );
dbms_job.submit( l_job, 'FillAndSend_IM3;' );
dbms_job.submit( l_job, 'FillAndSend_IM4;' );

when procedure is runing , found error "ORACLE error 6550 in FDPSTP

Cause: FDPSTP failed due to ORA-06550: line 1, column 93:
PLS-00201: identifier 'FILLANDSEND_IM1' must be declared"

View 11 Replies View Related

JDeveloper, Java & XML :: Writing XML To Oracle Directory

Apr 24, 2013

I have the following tables & data ..

create table identity (IDENTITY_ID varchar2(100));

Insert into identity values ('100');
Insert into identity values ('101');

create table CM_ENCOUNTER (IDENTITY_ID varchar2(100), CSN varchar2(100));

Insert into CM_ENCOUNTER values ('100','3a1');
Insert into CM_ENCOUNTER values ('101','1a2');

create table CM_PATIENT (IDENTITY_ID varchar2(100), GENDER varchar2(100), race varchar2(100));

Insert into CM_PATIENT values ('100','F','AA');
Insert into CM_PATIENT values ('101','M','HA');
Insert into CM_PATIENT values ('101','F','EA');

create table CM_ENCOUNTER_RFV
(IDENTITY_ID varchar2(100), CSN_ID varchar2(100), LINE varchar2(100), ENC_REASON_NAME varchar2(100));
Insert into CM_ENCOUNTER_RFV values ('100','23vx','2', 'phone');
commmit;

The output needed is :

<EvaluatePatient>
<PatientInformation>
<Patient>
<mrn>100</mrn>
<CSN>3a1</CSN>
[code]......

Based on the above, I created a table (which is of xml) ...

Create table temp_xml
as
Select XMLELEMENT("PatientInformation",(XMLELEMENT("Patient",
XMLELEMENT("mrn", s.identity_id),
XMLELEMENT("CSN", m.csn),
XMLELEMENT("Gender", p.gender),
[code]........

Now, I need to write each record into xml file. So, I used the below to write into file..but it gives me an error...wrong number of arguments to utl_file at line 14.

DECLARE
CURSOR c_data IS
SELECT * from temp_xml;
v_file UTL_FILE.FILE_TYPE;
BEGIN
[code]..........

View 4 Replies View Related

PL/SQL :: Writing User Defined Function The Same Way As The Oracle Functions

Sep 26, 2012

In one of the interviews , I have attended the guy asked me to write a user defined function which will take the column name and list all the values .

For example

Table Name:Employees
Column Name: Employee_Name

Employee_name
Scott
Ivgun
Jack
Shane

The query should be in this fromat

SELECT col_agg(Employee_name) emp_name from Employees;

The output should be

Emp_names
scott,ivgun,jack,shane

View 6 Replies View Related

Server Utilities :: Execution Of Oracle 11g Wrapped Procedure Gives Ora-00900 Error

Apr 4, 2013

I have a procedure which i wrapped using the oracle 11g wrap utility. If i execute the wrapped procedure using jdbc i am getting an error of 0RA-00900 invalid sql statement.

The procedure is having basic sql statements only.The same procedure if i wrap using Oracle 9i and execute using jdbc it works fine.Is there any change in Oracle 9i wrap utility and Oracle 11g wrap utility.

I tried even Oracle 10g wrap it is also not working fine.

View 4 Replies View Related

Server Utilities :: Insert Data Without Writing Insert Statement In Oracle?

May 15, 2010

how to insert data in oracle table without writing insert statement in oracle 9i or above. i am not going to write insert all, merge, sqlloder and import data.

View 2 Replies View Related

SQL & PL/SQL :: Compilation Error In Procedure

May 5, 2013

SQL> create or replace procedure procedure_test(id in number, city in varchar2(20) , name in varcha

r2(20) ) as
2 begin
3 insert into procedure_name(vid,vcity,vname) values(id,city,name);
4 end;
5 /

Warning: Procedure created with compilation errors.

There is a table named procedure_name with these columns exactly in database. what this Compilation Error is?

View 5 Replies View Related

SQL & PL/SQL :: Error In Compiling Procedure

Jan 3, 2012

i am new to oracle,when i am compiling below procedure,

create or replace procedure GetTempPolicyDetails2(i_officeid in number,pr_cursor out SYS_REFCURSOR) as

L_QUEY VARCHAR2(4000):= 'select POLTMP.POLICY_ID,POLTMP.CORPORATE_NAME,POLTMP.POLICY_FROM_DATE,POLTMP.POLICY_TO_DATE,
POLTMP.NETPREMIUM_WITH_SERVICE_TAX,
IOF.OFFICENAME,UW.NAME,REG.REGNAME,brmstr.brokername,created_on
from policies_temp POLTMP
INNER JOIN ISSUINGOFFICE IOF ON IOF.ID=POLTMP.Divisionid
INNER JOIN REGION REG ON REG.ID=IOF.RID
INNER JOIN underwriters UW ON UW.ID=REG.UWID
LEFT OUTER JOIN broker_master BRMSTR ON BRMSTR.ID=POLTMP.Broker_Name
where POLTMP.Policy_Status=1 where 1=1'
L_WHERE VARCHAR2(4000):='WHERE 1=1';
[code]....

View 5 Replies View Related

SQL & PL/SQL :: Compilation Error In Procedure?

Apr 25, 2013

I am having 3 procedures a,b,c. Procedure a is calling b,procedure b is calling c, and procedure c is calling procedure a.There is compilation error in procedure a but while compiling it is saying dependent procedure is uncompiled.

How to compile all the 3 procedures..

View 3 Replies View Related

PL/SQL :: Error Compiling Procedure?

Jul 31, 2012

I'm getting the following error on a procedure that I was able to compile until today after some changes.

ORA-06550: line 354, column 20:
PLS-00103: Encountered the symbol "AND" when expecting one of the following:
. then or
The symbol ". was inserted before "AND" to continue.

View 6 Replies View Related

Error In PL/SQL Procedure In Timesten In UNIX

Feb 22, 2012

create or replace procedure log_file
(
odsm_profile IN VARCHAR2
)
AS
handle utl_file.file_type;
begin

[code].....

i have error when executing this pl/sql procedure in timesten in UNIX

this is the excution error:

Command> exec log_file('hi');
8507: ORA-29280: invalid directory path
8507: ORA-06512: at "SYS.UTL_FILE", line 41
8507: ORA-06512: at "SYS.UTL_FILE", line 478
8507: ORA-06512: at "SIUA.LOG_FILE", line 8
8507: ORA-06512: at line 1

The command failed.

View 6 Replies View Related

SQL & PL/SQL :: Invalid Cursor Error In Procedure

Feb 2, 2011

I have this stored procedure as part of package.

PROCEDURE XCOM_X060_UPDATEOHBFAILURE( in_CALL_ID IN NUMBER,
in_SPLY_REORD_NO IN CHAR,
in_OHB_QTY_CARTONS IN NUMBER,
in_OHB_QTY_UNITS IN NUMBER,
in_SPLY_TOT_OHB_QTY IN NUMBER,
in_OHB_INPUT_CTNS_MIN IN NUMBER,
in_OHB_INPUT_CTNS_MAX IN NUMBER,
in_UNITS_PER_CARTON IN NUMBER,
in_OHB_INPUT_UNIT_CONSTANT IN NUMBER,
in_TOTAL_CARTONS IN NUMBER,
out_ALLOW_OHB_INPUT_FLAG OUT CHAR,
out_ERR_CODE OUT NUMBER,
out_ERR_MESSAGE OUT VARCHAR2)

When the stored procedure is executed it is throwing following exception OTHERS EXCEPTION in XCOM_X060_UPDATEOHBFAILURE - SQL -1001 SQLERRM: ORA-01001: invalid cursor

Here is the execution script
DECLARE
IN_CALL_ID NUMBER;
IN_SPLY_REORD_NO VARCHAR2(32767);
IN_OHB_QTY_CARTONS NUMBER;
IN_OHB_QTY_UNITS NUMBER;
IN_SPLY_TOT_OHB_QTY NUMBER;
IN_OHB_INPUT_CTNS_MIN NUMBER;
[code]...

There is no cursor used in the procedure. It just inserts records in the table for given input values.

View 10 Replies View Related

SQL & PL/SQL :: Error In Calling Collection Procedure

Jun 4, 2013

In a package I have one procedure "setscores_ram_bulk" with collection varaiavles.And other two procedures are

"UpdateRelatedOrders" and "SetGeoFraudScore"

with out collections.I am calling collection procedure "setscores_ram_bulk" in non collection procedures

"UpdateRelatedOrders" and "SetGeoFraudScore".

I am getting the below error.PLS-00306:wrong number or types of arguments in call to 'SETSCORES_RAM_BULK' .I am sending my code.

CREATE OR REPLACE PACKAGE GAFT_PROG_DIT.INTERNAL_SCORING_setscore_Bulk
IS
TYPE rec_setscores IS RECORD
(
pBUID score.buid%TYPE,
OrderNum score.order_num%TYPE,
ScoreType VARCHAR2(100),
p_Score score.velocity_score%TYPE
);
[code]....

View 19 Replies View Related

Writing IF Statement Using SYSDATE?

Apr 22, 2011

I have an employee table. I Have to get the data of all employees in such a way that. If today I run the Query,then i have to get the data of all employees working between december 1st of previous year(current year-1 i.e., december 1st 2010.) till today(april 21st). If the query run date is in the month of december(example december 15th) then the query should get the data from december 1st of current year(december 1st 2011) to December 15th. I wrote the if statement some how its not working. I want to make use of this If or Case Statement as the start date of the employee_timestamp. Is this possible here or not.

select * from employee
where
employee.employee_timestamp > (select to_date(to_char(concat('12-01-', extract(YEAR FROM sysdate)-1)),'MM/DD/YYYY') as Startdate From DUAL)
and
employee.employee_timestamp < (SELECT SYSDATE FROM DUAL).

[code]....

View 1 Replies View Related

SQL & PL/SQL :: Writing A Code For When Condition

Feb 5, 2013

I have a problem in running a sql query.I have a dataset with the following details. Product name,product status,approval date in table product_details. I have a code as follows

select Product_name,
Product_status,
approval_date,
case
when product_status ='Cancelled' or product_status ='Stopped' then approval_date='N/A'
when product_status='Active' then NVL2(approval_date,cast(appoval_date as nvarchar2(30)),'Null')
when product_status='Completed' then NVL2(approval_date,cast(appoval_date as nvarchar2(30)),'Null1')
when product_status='Planned' then NVL2(approval_date,cast(appoval_date as nvarchar2(30)),'Null2')
end as DER_approval_date

from product_details

but i have a error in running this code saying character mismatch.

View 6 Replies View Related

Executed Procedure - Buffer Overflow Error

Nov 16, 2011

when i am executing the procedure, i am getting the below error.

I have added below lines in the procedure.

DBMS_OUTPUT.ENABLE(100000);

Even though i am getting the error.

ORA-20000: ORU-10027: buffer overflow, limit of 100000 bytes
ORA-06512: at "SYS.DBMS_OUTPUT", line 32
ORA-06512: at "SYS.DBMS_OUTPUT", line 97
ORA-06512: at "SYS.DBMS_OUTPUT", line 112
ORA-06512: at "Procedure name", line 199
ORA-06512: at line 1
20000. 00000 - "%s"

*Cause: The stored procedure 'raise_application_error' was called which causes this error to be generated.

*Action: Correct the problem as described in the error message or contact the application administrator or DBA for more information.

View 6 Replies View Related

Forms :: Illegal Restricted Procedure Error

Aug 25, 2011

I have data block, after inserting records, in post insert i am using 'GO_ITEM' built_in as i have to move cursor to particular item in another block.

It's giving 'Illegal Restricted procedure' error. How to move cursor to particular item of another block after inserting record?

View 5 Replies View Related

SQL & PL/SQL :: Stored Procedure Function - Numeric Or Value Error

Apr 16, 2010

I have wrote a Stored Procedure Function that get all the rows from a Staging Table and assigns it to a CLOB and returns the CLOB. The issue is I'm getting the dreaded

ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "F_CLOB_TEST", line 21
ORA-06512: at line 7

The error does not occur when I remove the 'PRC_ID', 'S_FIL_NAME' & 'exportDt' from the query. It works fine. The PRC_ID has data such as "700$702$7 05$706$707$708$709$710$711$712$713$714$715$294404$294405$294407$294408$294409$294410"

and S_FIL_NAM is the same for all columns - "SBENE_FILID810-2010-04-07-10.59.17"

The query returns 829 rows. Also I have to include a few more columns in the query which have data larger than the 'PRC_ID', but I have not included them here in the sample code, as this code by itself returns the ORA-6502 error.

create or replace
FUNCTION "F_CLOB_TEST" (job_id in Number)
return clob
is
c_clob clob;
[code]....

View 26 Replies View Related

SQL & PL/SQL :: Error When Tried Sending Email Through Stored Procedure?

Jan 6, 2011

I have this stored procedure that does implements some business logic and then sends an email.

I got the below error when it tried to send the email

Quote:Returned values:
ERR_CODE =-29279,
ERR_MESSAGE = "MSS DATABASE INCONSISTENCYOTHERS EXCEPTION in XCOM_X080_SUBMITORDER - SQL -29279 SQLERRM: ORA-29279: SMTP permanent error: 501 5.5.2 Syntax error in parameters scanning "TO""

How can I handle this error using exception and in case sending email fails instead of abnormal exit ?

View 2 Replies View Related

SQL & PL/SQL :: ORA-06550 / Error Executing Stored Procedure

Nov 18, 2010

Procedure: CREATE OR REPLACE procedure test (a number, b varchar2) is

begin
dbms_output.put_line(a ||'->'||b);
end;

Anyonymous Block:

begin
exec test(1,'m');
end;
/
When i run this i am getting this error
ORA-06550: line 2, column 7:
PLS-00103: Encountered the symbol "TEST" when expecting one of the following
[code]...

View 5 Replies View Related

Error Message When Debugging Dynamic Sql Procedure?

Nov 13, 2007

I get this error message when debugging this dynamic sql procedure:

ORA-00922: missing or invalid option
ORA-06512: at "PLANNING_PWR.RUNNING_TIMES_EXP", line 66
ORA-06512: at line 12

I cannot find where the error is.

CREATE OR REPLACE
procedure running_times_exp(p_table_name IN VARCHAR2,
p_pattern in varchar2,
p_f_date IN DATE,

[code]...

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved