Database is Hanging after executing the Procedure ...
Dear All i am using 10G.
I Have a procedure . After executing the Procedure when i try to call that procedure it is hanging ...
it is creating Locks .. As our DBA told..And told to check the code ...
Can any one tell me how can i put mu codes with formatting ? When i copy paste my code it is showing properly but after POST MESSAGE it is showing like i have written history ...--*
I am Executing the procedure like this ...
EXEC simulator_validation ('0|BP-V1|20101004|01|1|2430962.89|27|2430962.89|MUR|20100928120106','04-SEP-2010',27,2430962.89,'MUR','000111111111');
And my code is :-
{Create Or Replace Procedure simulator_validation (lstring varchar2,ldate date,lno_item number,ltotal number,lcur varchar2,lac_no Varchar2)
IS
l_swift_code_acno number;
l_ACno_Valid number;
l_swift_code_others Number;
lpcode varchar2(5);
lCcode Varchar2(4);
lval number;
lacno varchar2(16);
v_file varchar2(20);
v_path varchar2(50);
LToken VARCHAR2(100) ;
i PLS_INTEGER := 2 ;
lfirst_char number;
lvalue Varchar2(100) ;
lcol number:= 1;
Begin
lfirst_char := Substr(lstring,0,1);
Dbms_output.put_line(lfirst_char);
IF lfirst_char = '0' Then ------------------- For the 1st Line - Should be start from 0
Loop
LToken := mcb_simulator_pkg.Split( lstring, i , '|') ;
lvalue := LToken;
IF lcol=1 then
If lvalue='BP-V1' THEN
Dbms_output.put_line('1');
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0003','Invalid file type and version number');
Dbms_output.put_line('2');
End if;
Elsif lcol=2 then
If lvalue=To_Char(ldate,'YYYYMMDD') THEN
Dbms_output.put_line('3');
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0004','Due date differs from the value inputted in the loading screen');
Dbms_output.put_line('4');
End if;
Elsif lcol=3 then
Begin
Select PAYMENT_PURPOSE_CODE into lpcode
From MU_PURPOSE_CODE
Where PAYMENT_PURPOSE_CODE = lvalue;
IF lpcode = lvalue Then
Dbms_output.put_line('5');
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0006','Invalid payment purpose code');
Dbms_output.put_line('6');
End If;
Exception
When No_data_found Then
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0006','Invalid payment purpose code');
End;
Elsif lcol=4 then
If lvalue='1' THEN
Dbms_output.put_line('7');
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0008','Total number of debit records in header does not tally with number debit records in the file.');
Dbms_output.put_line('8');
End if;
Elsif lcol=5 then
If lvalue=ltotal THEN
Dbms_output.put_line('9');
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0010','Total debit transaction amount in header does not tally with the sum of debit transaction amount in the file');
Dbms_output.put_line('10');
End if;
Elsif lcol=6 then
If lvalue=lno_item THEN
Dbms_output.put_line('11');
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0025','Number of credit records does not tally with credit records in the file.');
End if;
Elsif lcol=7 then
If lvalue=ltotal THEN
Dbms_output.put_line('12');
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0026','Sum of credit records does not tally with total transaction amount as inputted in the loading screen');
End if;
Elsif lcol=8 then
If lvalue=lcur THEN
Begin
Select Cur_CODE into lCcode
From Mu_currency_Code
Where Cur_CODE = lvalue;
Dbms_output.put_line('13');
Exception
When No_data_found Then--------------------
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0014','Invalid Currency');
End;
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0013','Currency differs from the value inputted in the loading screen');
End if;
Elsif lcol=9 then
If lvalue=Null THEN
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0015','Timestamp should not be null');
Elsif lvalue <> lvalue Then
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0046','Timestamp in header should be in the format YYYYMMDDHHMMSS');
End if;
End IF;
EXIT WHEN LToken IS NULL ;
i := i + 1 ;
lcol:=lcol+1;
End LOOP;
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (9999,'0002','First line should always start with 0');
End if ;}
-------------------- For the 2nd Line , should be start from 9 .-----------------------------
{ lfirst_char := Substr(lstring,0,1);
IF lfirst_char = '9' Then
LOOP
LToken := mcb_simulator_pkg.Split( lstring, i , '|') ;
lvalue := LToken;
IF lcol=1 then
If lvalue < 0 THEN
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0017','Amount should be greater than zero');
Elsif lvalue = ltotal THEN
Dbms_output.put_line('20');
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0018','Transaction amount differs from the value inputted in the loading screen');
End if;
ELSIF lcol = 2 THEN
If lvalue = Substr(lac_no,4,9) THEN
mcb_simulator_pkg.Acct_no_Validator(lvalue,1111,l_ACno_Valid);
mcb_simulator_pkg.Swift_code_validator_for_ac_no(lvalue,1111,l_swift_code_acno);
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0020','Account number differs from the account number inputted in the loading screen');
End if;
ELSIF lcol = 3 THEN
If lvalue is not null THEN
mcb_simulator_pkg.Swift_code_validator_for_other(lvalue,1111,l_swift_code_others);
Else
Dbms_output.put_line('21');
End if;
END IF;
EXIT WHEN LToken IS NULL ;
i := i + 1 ;
lcol:=lcol+1;
End Loop;
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (8888,'0016','Second line should start with 9');
End IF; }
-------------------- For the 3rd Line Should be start from 1.--------------------------
{ LOOP
lfirst_char := Substr(lstring,0,1);
IF lfirst_char = '1' Then
Loop
LToken := mcb_simulator_pkg.Split( lstring, i , '|') ;
lvalue := LToken;
IF lcol=1 then
If lvalue > 0 THEN
Dbms_output.put_line('24');
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0017','Amount should be greater than zero'); End if;
ELSIF lcol=2 then
Mcb_simulator_pkg.Acct_no_Validator(lvalue,1111,l_ACno_Valid);
Mcb_simulator_pkg.Swift_code_validator_for_ac_no(lvalue,1111,l_swift_code_acno);
ELSIF lcol = 3 THEN
If lvalue is not null THEN
mcb_simulator_pkg.Swift_code_validator_for_other(lvalue,1111,l_swift_code_others);
Else
Dbms_output.put_line('26');
End
END IF;
EXIT WHEN LToken IS NULL ;
i := i + 1 ;
lcol:=lcol+1;
End Loop;
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (7777,'0022','The third line onward should start with 1');
End if;
END LOOP;
Commit;
End;}
Edited by: LuKKa on Oct 4, 2010 9:20 PM
Edited by: LuKKa on Oct 4, 2010 9:25 PM
Yes i gave {} but it is also coming like this ...Yes, since you should use {noformat}{noformat} before and after your example, and not putting your example between a '{' and a '}'.
So, when you post/type/copypaste:
{noformat}select *
from emp;{noformat}
on this forum, it will appear as:select *
from emp;See the FAQ for more tags/tips:
http://forums.oracle.com/forums/help.jspa
Similar Messages
-
Shows output / summary after executing a procedure
Developers have come to me, with below challenge, I am not able to solve / help with, found nothing from my 1 hour search on Google and forums.
Is there parameter in database or SQLPlus that shows output / summary after executing a procedure?
I have few updates and few inserts in my procedures, I also user[b] execute immediate once on my proc.
I want to know how many rows were updated / inserted, at the moment you just get ‘successfully completed.’ After executing a procedure.
SQL> @myproc.sql
PL/SQL procedure successfully completed.If anyone is 100% it's not possible, and you have to do it manually using dbms_output, please let me know.
Thanks for any helpPL/SQL executes inside the Oracle server process that is servicing your client session. How can it display anything on the client side?
SQL*Plus (a typical client) displays information messages such as "PL/SQL procedure successfully completed." - and it reads the DBMS_OUTPUT buffer in PL/SQL and write it to your display (when the SERVEROUTPUT SQL*Plus environment variable is set).
PL/SQL is incapable of "displaying" anything. Rendering is done the client.
It is important to grasp this basic client-server concept.
PL/SQL is also in fact two very distinct languages that are tightly integrated. PL and SQL. When PL executes a SQL statement, it does so via the same basic Oracle call interface as any other language. Part of this call interface contains the results of the SQL statement executed - this not only include a return code, but also the number of rows reported affected by the SQL engine. PL "publishes" that result via its system variable called SQL%ROWCOUNT.
However, due to the way PL calls SQL with respect to the different ways you can construct SQL in PL (implicit cursors, explicit cursors, ref cursors, etc), this variable is only valid when dealing with an implicit cursor. Cursor "system/SQL" variables also exist and these are prefixed with the variable name of the cursor in the format <cursorvar>%<sqlvar>.
Details can be found in the [url http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/toc.htm]Oracle® Database PL/SQL User's Guide and Reference. -
How will be outbound data structure in sap xi after executing the stored pr
Hi All
can any one please tell me how will be outbound data structure in sap xi after executing the stored procedure by sender JDBC adapter?
Thanks in advance
regards
RamsHi..
My stored procedure is select and it will be OUTBOUND in PI.
is it will be same as following
<resultset>
<row>
<column-name1>column-value</ column-name1>
<column-name2></column-name2>
<column-name3>column-value</ column-name3>
<column-name4></column-name4>
</row>
<row>
<column-name1>column-value</ column-name1>
<column-name2></ column-name2>
</row>
</resultset>
Regards
Rams
Edited by: Rameshkumar Varanganti on Oct 15, 2008 12:04 PM -
Strage behaviour while executing the Procedure
Hi All,
In Schema "Dwr_trade" we have one procedure Proc1. There is another schema
" Dwr_trade_user " this schema has execute privilege on Proc1 of "Dwr_trade" schema.
When we are executing the procedure Proc1 from "Dwr_trade" schema as follows
Dwr_trade --- (Procedure is created here)
Begin
Exec procedure Dwr_trade.Proc1
End;
It gives error ,but when we are executing the same procedure after removing the prefix "Dwr_Trade" it is executing successfully.
when we are executing the procedure from "Dwr_trade_user " then also is working fine.We are executing it as follows.
Dwr_trade_user
Begin
Exec procedure Dwr_trade.Proc1
End;
Any pointer why this is giving error in 1st case.
Many Thanks
DikshitBegin
Exec procedure Dwr_trade.Proc1 <----Isnt Syntax prob
End;
SQL> CREATE OR REPLACE PROCEDURE mypro AS
2 BEGIN
3 null;
4 END;
5 .
SQL> /
Procedure created.
SQL> EXECUTE PROCEDURE mypro;
BEGIN PROCEDURE mypro; END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00103: Encountered the symbol "PROCEDURE" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge
<a single-quoted SQL string> pipe
SQL> EXECUTE PROCEDURE scott.mypro;
BEGIN PROCEDURE scott.mypro; END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00103: Encountered the symbol "PROCEDURE" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge
<a single-quoted SQL string> pipe
The symbol "PROCEDURE" was ignored.
SQL> EXECUTE mypro;
PL/SQL procedure successfully completed.
SQL> EXECUTE scott.mypro;
PL/SQL procedure successfully completed.Khurram -
After executing the APP in F110, printer is not triggering.
Hi, I have an issue.Please help me in resolving the same.
After executing the Automatic Payment Program in F110, printer is not trigging of printing cheques. How ever we are able to print the cheque through transaction FBZ5 (individually). Users are not accepting this procedure of printing manually.
Thanks in advance.
Regards,
Nageswar Rao.Hi,
Have you
1. clicked the printout icon and given the job name for printing? or
2.ensure that whether you maintain the variant in which print immediately is checked for check print.
Regards,
H.Saravanakumar. -
Button on toolbar after executing the report i.e. after result display
Hi, after executing the report result is being displayed.Now at this stage I want a button on the application toolbar clicking on which will allow a perform to get triggered.
I tried in following manner:
SELECTION-SCREEN: FUNCTION KEY 1.
*INITIALIZATION.
TABLES: SSCRFIELDS.
*MOVE icon_mail TO sscrfields-functxt_01.
*form SEND_EMAIL .
IF sy-ucomm = 'FC01'.
PERFORM SEND_MAIL_ASSET_STATUS.
ENDIF.
But it's not ok.The above way is not working.
Please note: I want button on toolbar only after executing the report i.e. after result display.
How can I do this?
Kindly guide.
Best regards.hi
if you are using alv than just pass 3 values to function call
I_CALLBACK_PROGRAM = SY-REPID " program name
I_CALLBACK_PF_STATUS_SET = 'STATUS' "PF-STATUS
I_CALLBACK_USER_COMMAND = 'UCOMMAND' " subroutine name
and check the value of UCOMM in subroutine -
While executing the Procedure Getting Error
Hi I am New to ODI.
I create one new Procedure just to delete the Target table.
delete from <%=snpRef.getTable("L","T_CUSTOMER","D")%>. T_Customer is my target table.Technology:Oracle(Both Source and Target)
I selected the correct Context ,Schema and Technology.
While executing the procedure i am getting following error
java.lang.Exception: Internal error: object ConnectConnection
ColConnectId:null
ColContextCode:DEV
ColConName:null
ColIndCommit:null
ColIsolLevel:null
ColLschemaName:null
ColPlanComp:null
ColTechIntName:null
DefConnectId:null
DefContextCode:DEV
DefConName:null
DefIndCommit:null
DefIsolLevel:null
DefLschemaName:FCS
DefPlanComp:null
DefTechIntName:ORACLE
ExeChannel:J
IndErr:1
IndLogMethod:null
IndLogNb:null
LogLevDet:3
Nno:1
OrdTrt:0
ScenTaskNo:1
SessNo:61001
TaskName1:Procedure
TaskName2:Delete
TaskName3:Delete
TaskType:S
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execSrcOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source)
Thanks in advance.i Used the below syntax and checked its working fine.
delete from <%=snpRef.getObjectName("L","T_CUSTOMER","D")%> -
Error after executing the edidlinv
Hi All,
Following is the error message i am facing after executing the batch edidlinv
edidlinv_1~20120229104954~process~invc_head, invc_detail, invc_xref, invc_merch_vat, invc_non_merch, item_master, sups, partner, vat_code_rates, v_restart_store_wh~-1405~ORA-01405: fetched column value is NULL~CURSOR FETCH: cursor=c_invoice, ps_driver_name=STORE_WH, ps_num_threads=1, ps_thread_val=1, ps_restart_invc_id=8678.
Regards,
Sushanth.Dplease open the pro*c source in an editor, lookup the cursor mentioned, and study it and/or run it in sqlplus, to understand why no data is found.
E -
I got a new Ipad 2 and I am trying to get it work in vain. I have downloaded the iTunes on my PC, but even after executing the program nothing happens to the IPAD. I still get the image of the USB cable and the iTunes logo. What am I doing wrong?
You know that you have to connect the iPad to your PC with the cable that came with it - and then iTunes should start automatically and it will guide you through the set up process?
If you have already tried to connect the iPad - and you have launched iTunes - and you still have no luck - reboot your PC and then begin the process again. -
Auto Drag-and-Drop after execute the exteral program
I execute a program and provide the pathname.
The external program support Drag-and-Drop and also Open files by clicking Menu.
I have to open file after executing the program.
Is it possible to do that?>
What actually happens when you browse to a file of type 'TS video' (e.g. using Windows Explorer) and double click on it?>It* opens in VLC media player here, my default player for AVI's.
>
Does it open in the 'software that find the TV station information'?
If not, it probably means that filetype is not 'associated' with that program. If that is the case, it will not work using the Desktop class (as I understand the Desktop class).
What happens when you try to Desktop.browse(URI) to the video?>
>
[http://lmc4b5b.com/temp_stop/123322113213.avi] >
* this file..
>
It seems to be no response.....>That seemed odd, since Desktop.browse() throws a whole mess of exceptions if it cannot do what you ask for. This is the output I got here, for both browse() and open().
Exception in thread "main" java.io.IOException:
Failed to open file:/C:/.../123322113213.avi.
Error message: The parameter is incorrect.
at sun.awt.windows.WDesktopPeer.ShellExecute(WDesktopPeer.java:59)
at sun.awt.windows.WDesktopPeer.open(WDesktopPeer.java:36)
at java.awt.Desktop.open(Desktop.java:254)
...So - I was wrong in thinking any double clickable file would open in the correct program using Desktop. That is a pity.
On a side noted, related to exec().
Can you ..
a) launch the program from the command line?
b) launch the program form the command line, specifying a file to work with?
e.g.
C:>program path/to/the.avi
If so, why not simply add the file name as an argument to exec()? Or indeed (since I notice you are willing to use 1.6) swap the 'exec()' for ProcessBuilder - introduced in 1.5. -
Call or execute the procedure 1000 times simultaneously
Hi all,
I hava written a procedure. And i want to call or execute the procedure 1000 times simultaneously.
I don't want like below
for i in 1..1000 loop
exec procedure1
end loop;
Any Idea ?
Bye
NathanYou want the procedure to run 1000 simultaneously? Well, one way to do this is to set up 1000 SQL*Plus sessions and prepare 1000 EXEC statements, which you kick off at the same time. This approach is good if you're a Hindu deity.
Alternatively you can use DBMS_JOB to submit calls to the procedure, viz.
for i in 1..1000 loop
DBMS_JOB.SUBMIT(jobno , what=>'procedure1', next_date=> trunc(SYSDATE) + 11/24);
end loop; This - trunc(SYSDATE) + 11/24 - ensures that all the jobs kick off at 11 o'clock in the morning. You may need to adjust the timing to suit your needs.
Are you sure you have sufficient resources to run this job 1000 times?
Vibes, APC -
Gettng Error while executing the procedure(oracle 10.2.0.3.0)
Hi all,
I am getting following error While executing the package .
PLS-00103: Encountered the symbol "Truncate" when expecting one of
the following:
* & = - + ; < / > at in is mod remainder not rem return
returning <an exponent (**)> <> or != or ~= >= <= <> and or
like LIKE2_ LIKE4_ LIKEC_ between into using || multiset bulk
member SUBMULTISET_I have written follwing query in the package body.
EXECUTE IMMEDIATE 'TRUNCATE TABLE FORT ';
EXECUTE IMMEDIATE '
INSERT INTO FORT (CID,CODE,DESC,SCODE,SES,T_DT,SDN,LANG)
SELECT
SERVICES.CID CID,
PROFILE.FUCODE CODE,
TO_DATE(SUBSTR(SERVICES.STAT_CHNG,-7,6),'YYMMDD') T_DT,
PHOR.NUM SDN,
C_ALL.cLANGUAGE LANG
FROM
SERVICES .....Please give me the solution for this .
Thank y ou
Edited by: user636482 on Apr 10, 2009 1:08 AMI am getting following errors if I gave " ' " after not null.
LINE/COL ERROR
42/8 PLS-00103: Encountered the symbol "AND" when expecting one of the
following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> << close current delete fetch lock insert
open rollback savepoint set sql execute commit forall merge
pipe
42/56 PLS-00103: Encountered the symbol "A" when expecting one of the
following:
LINE/COL ERROR
) , * & | = - + < / > at in is mod remainder not rem => ..
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ between || multiset member SUBMULTISET_
The symbol ", was inserted before "A" to continue.
42/74 PLS-00103: Encountered the symbol "D" when expecting one of the
following:
* & - + ; / at mod remainder rem return returning
<an exponent (**)> and or || multiset
The symbol "* was inserted before "D" to continue.
LINE/COL ERROR
45/6 PLS-00103: Encountered the symbol "COMMIT"
52/3 PLS-00103: Encountered the symbol "PROCEDURE" when expecting one
of the following:
end not pragma final instantiable order overriding static
member constructor map
The symbol "static" was substituted for "PROCEDURE" to continue.
85/8 PLS-00103: Encountered the symbol "AND" when expecting one of the
following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
LINE/COL ERROR
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> << close current delete fetch lock insert
open rollback savepoint set sql execute commit forall merge
pipe
85/56 PLS-00103: Encountered the symbol "A" when expecting one of the
following:
) , * & | = - + < / > at in is mod remainder not rem => ..
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ between || multiset member SUBMULTISET_
The symbol ", was inserted before "A" to continue.
LINE/COL ERROR
85/74 PLS-00103: Encountered the symbol "D" when expecting one of the
following:
* & - + ; / at mod remainder rem return returning
<an exponent (**)> and or || multiset
The symbol "* was inserted before "D" to continue.
88/8 PLS-00103: Encountered the symbol "COMMIT"
95/3 PLS-00103: Encountered the symbol "PROCEDURE" when expecting one
of the following:
end not pragma final instantiable order overriding static
LINE/COL ERROR
member constructor map
The symbol "static" was substituted for "PROCEDURE" to continue.
133/3 PLS-00103: Encountered the symbol "PROCEDURE" when expecting one
of the following:
end not pragma final instantiable order overriding static
member constructor map
The symbol "static" was substituted for "PROCEDURE" to continue.
169/3 PLS-00103: Encountered the symbol "PROCEDURE" when expecting one
of the following:with out adding " ' " I am getting the previous error which I mentioned in Previous thread(TRUNCATE)
Thank you -
Can you tell me how to execute the procedure?
create or replace get_dob
(ss_number varchar2,dob out date)
as
begin
select birth_dae
into dob
from person
where soc_sec_num=ss_num;
exception when no_data_found
error_notify(ss_num);
end;
the question is that when i want to execute this procedure,how can I use the command?
I try to use the "execute get_dob('wang');"in the sql/plus,but the system give me wrong information.Errors:
1. You left out the word PROCEDURE after CREATE OR REPLACE.
2. You used ss_number in one place and ss_num in two others. These must be the same name.
3. You left out the word THEN after WHEN NO_DATA_FOUND.
Possible errors:
1. Is birth_dae spelled correctly? Or, should it be birth_date?
2. Is error_notify a user-defined procedure?
Additional suggestions:
1. It is better to use table_name.column_name%TYPE instead of specifying NUMBER, VARCHAR2, DATE, etc. for your parameters. That way if the column data types are changed in the future, you don't have to change your code.
2. You will need to SET SERVEROUTPUT ON and use DBMS_OUTPUT.PUT_LINE to display the contents of the variable that holds the value of the out parameter.
3. Please see suggested code for creation of procedure and execution of procedure below. I have included one row of test data so that some output will be displayed. I commented out the exception section, in order to test it, since I don't have your error_notify procedure.
SQL> -- test data:
SQL> CREATE TABLE person
2 (birth_dae DATE,
3 soc_sec_num NUMBER)
4 /
Table created.
SQL> INSERT INTO person
2 VALUES (SYSDATE, '123456789')
3 /
1 row created.
SQL> SELECT * FROM person
2 /
BIRTH_DAE SOC_SEC_NUM
06-DEC-02 123456789
SQL>
SQL>
SQL> -- create procedure:
SQL> CREATE OR REPLACE PROCEDURE get_dob
2 (ss_number IN person.soc_sec_num%TYPE,
3 dob OUT person.birth_dae%TYPE)
4 AS
5 BEGIN
6 SELECT birth_dae
7 INTO dob
8 FROM person
9 WHERE soc_sec_num = ss_number;
10 -- EXCEPTION
11 -- WHEN NO_DATA_FOUND THEN
12 -- error_notify (ss_number);
13 END get_dob;
14 /
Procedure created.
SQL> SHOW ERRORS
No errors.
SQL>
SQL>
SQL> -- execute procedure:
SQL> SET SERVEROUTPUT ON
SQL> DECLARE
2 v_dob DATE;
3 BEGIN
4 get_dob ('123456789', v_dob);
5 DBMS_OUTPUT.PUT_LINE (v_dob);
6 END;
7 /
06-DEC-02
PL/SQL procedure successfully completed. -
Error while executing the procedure
Hi,
I tried the following example it's compiled but while executing giving the errors
create or replace PROCEDURE createRZGSet (
rNm IN VARCHAR2,
rDsc IN VARCHAR2,
rId OUT NUMBER
) IS
cId INTEGER;
BEGIN
cId := 1;
SELECT q_id.NEXTVAL
INTO rId
FROM DUAL;
INSERT INTO t_set (rid,
r_nm,
r_dsc,
o_id,
flag) VALUES (rId,rNm,rDsc,cid,'P');
END;
/The above is compiled ... but while executing
SQL> declare
2 optval number;
3 begin
4 execute createRZGSet('myp','miyapur',optval);
5 dbms_output.put_line('val returned is:'||optval);
6 end;
7 /
execute createRZGSet('myp','miyapur',optval);
ERROR at line 4:
ORA-06550: line 4, column 10:
PLS-00103: Encountered the symbol "CREATERZGSet" when expecting one
of the following:
:= . ( @ % ; immediate
The symbol ":=" was substituted for "CREATERZGSet" to continue.could you please hint me in this error..
thanxThe above is compiled ... but while executing
SQL> declare
2 optval number;
3 begin
4 execute createRZGSet('myp','miyapur',optval);
5 dbms_output.put_line('val returned is:'||optval);
6 end;
7 /remove the execute key word. it belongs to SQL Plus. in pl/sql you can just give the procedure name thats enought.
SQL> declare
2 optval number;
3 begin
4 createRZGSet('myp','miyapur',optval);
5 dbms_output.put_line('val returned is:'||optval);
6 end;
7 / -
Getting ORA-06512/ORA-00972 ERROR WHILE EXECUTING THE PROCEDURE????
Hi ,
while executing this procedure , I am getting follwoing errors:
Create or Replace procedure ADD_CUSTOM_INDEX is
INDX_NOT_EXIST Number;
CREATE_SQL_STATMENT VARCHAR2(1500);
ALTER_SQL_STATMENT VARCHAR2(150);
CURSOR C1 IS select INDEX_NAME,CREATE_DDL FROM W_CUSTOM_TEST, WC_COMPANY_G WHERE W_CUSTOM_TEST.SYS_TENANT_ID = WC_COMPANY_G.BU_ID;
BEGIN
for V_ROW in C1 loop
SELECT COUNT(USER_INDEXES.INDEX_NAME) INTO INDX_NOT_EXIST FROM USER_INDEXES WHERE USER_INDEXES.INDEX_NAME = V_ROW.index_name;
IF INDX_NOT_EXIST = 0 THEN
CREATE_SQL_STATMENT := ''|| '"'|| V_ROW.CREATE_DDL ||'"' ||'PARALLEL NOLOGGING';
EXECUTE IMMEDIATE CREATE_SQL_STATMENT;
ALTER_SQL_STATMENT := 'ALTER INDEX ' ||'"'|| V_ROW.INDEX_NAME ||'"'|| ' NOPARALLEL LOGGING';
EXECUTE IMMEDIATE ALTER_SQL_STATMENT;
END IF;
END LOOP;
END ADD_CUSTOM_INDEX;
ERROR at line 1:
ORA-00972: identifier is too long
ORA-06512: at "LOLAP.ADD_CUSTOM_INDEX", line 13
ORA-06512: at line 1.
sturtuce of W_custom_test table is as below:
CREATE TABLE "LOLAP"."W_CUSTOM_TEST"
("INDEX_NAME" VARCHAR2(30) NOT NULL ENABLE,
"SYS_TENANT_ID" VARCHAR2(15) NOT NULL ENABLE,
"CREATE_DDL" VARCHAR2(1200),
"COMMENTS" VARCHAR2(200),
"STAT_CD" VARCHAR2(30) DEFAULT 'Active' NOT NULL ENABLE,
"CREATED" DATE DEFAULT SYSDATE NOT NULL ENABLE,
"LAST_UPD" DATE DEFAULT SYSDATE NOT NULL ENABLE
Any Pointer??????Hi
Instead of giving as below, go for the not null constraints.
"STAT_CD" VARCHAR2(30) DEFAULT 'Active' NOT NULL ENABLE,
"CREATED" DATE DEFAULT SYSDATE NOT NULL ENABLE,
"LAST_UPD" DATE DEFAULT SYSDATE NOT NULL ENABLE
That should help
Regards
Sudheer
Maybe you are looking for
-
Public Folder Migration from Exchange 2007 to 2013
Hi Guys, I have a general Exchange 07-13 migration question about migrating the PF's and System Folder Information, I read somewhere that the SystemFolder info doesn't come across, can someone shed some light on this for me please? Thanks, Ray
-
How do I add folders on the menu toolbar using windows 7
On windows xp I just went to file and clicked on folders, new, and typed in a new heading on the menu bar. On windows 7 there is no folder line under file.
-
Single and strategy plan( What does it means )?
Hi all, Please explain me what does single cycle plan and strategy plan means. Following is my requirement. ( Since Swedish mills and other units use not only single cycle plans but also strategy plans , sometimes with multiple operations to each mai
-
Hi sap gurus, 1) What r the datas we have to upload before golive 2) How can i divided to upload data, like open items, cleard items $ balances like this thanku raj
-
Noisy images in preview on Mac OS X Yosemite
I recently downloaded the Yosemite OS and since have had some trouble with it. First off, when you want to preview an image in any folder with the spacebar option, the image is noisy and it takes a whole while for the image to be displayed clear. Se