PLSQL doubt
I am new to PLSQL,
I will be passing a parameter from unix shell when executing a plsql file. This parameter will be used IN statement of the plsql.
for example i will pass "'dy','pp','dh'" as a sting parameter.
in plsql i have
WHERE STATUS IN (&1);
The problem I am facing is that it takes the whole parameter as single value insteated of dy, pp,dh. I dont know how to solve this problem. Plz help
You should look carefully at the sql*plus output - as You can see it types the real string passed to &1:
SQL> select table_name from user_tables where table_name in (&1);
Enter value for 1: 'TEST_TABLE1','TEST_TABLE2'
old 1: select table_name from user_tables where table_name in (&1)
new 1: select table_name from user_tables where table_name in ('TEST_TABLE1','TEST_TABLE2')
TABLE_NAME
TEST_TABLE1
TEST_TABLE2
SQL>
I think, the root of trouble is in the processing of special character "'" in shell.
Similar Messages
-
A doubt in xml ..should i use extract or make my own plsql function..
I am using apex.. and fetchiNG data in xml format..
Now in plsql ..There are functions ..like extract which can be used to extract the values..
But i find it difficult to understand
since i find making a function which shall use substring and instr to find the value .. .
Wait let me show you the example of xml..data
<?xml version="1.0" encoding="WINDOWS-1252"?>
<CraftyResponse>
<address_data_paf_compact>
<thoroughfare_count>1</thoroughfare_count>
<thoroughfare>
<delivery_point_count>5</delivery_point_count>
<delivery_point>
<organisation_name>THE BAKERY</organisation_name>
<department_name/>
<po_box_number/>
<building_number>1</building_number>
<sub_building_name/>
<building_name/>
<udprn>12345678</udprn>
</delivery_point>
<delivery_point>
<organisation_name>FILMS R US</organisation_name>
<department_name/>
<po_box_number/>
<building_number>3</building_number>
<sub_building_name/>
<building_name/>
<udprn>12345679</udprn>
</delivery_point>
<delivery_point>
<organisation_name>FAMILY BUTCHER</organisation_name>
<department_name/>
<po_box_number/>
<building_number>7</building_number>
<sub_building_name/>
<building_name/>
<udprn>12345680</udprn>
</delivery_point>
<delivery_point>
<organisation_name/>
<department_name/>
<po_box_number/>
<building_number/>
<sub_building_name/>
<building_name>BIG HOUSE</building_name>
<udprn>12345681</udprn>
</delivery_point>
<delivery_point>
<organisation_name/>
<department_name/>
<po_box_number/>
<building_number>17</building_number>
<sub_building_name/>
<building_name>LITTLE COTTAGE</building_name>
<udprn>12345682</udprn>
</delivery_point>
<dependent_thoroughfare_name/>
<dependent_thoroughfare_descriptor/>
<thoroughfare_name>HIGH</thoroughfare_name>
<thoroughfare_descriptor>STREET</thoroughfare_descriptor>
</thoroughfare>
<double_dependent_locality/>
<dependent_locality>CRAFTY VALLEY</dependent_locality>
<town>BIG CITY</town>
<postal_county>POSTAL COUNTY</postal_county>
<traditional_county>TRADITIONAL COUNTY</traditional_county>
<postcode>AA1 1AA</postcode>
</address_data_paf_compact>
</CraftyResponse>
Now how do i extract values of town, postal_country building_name,
I know we can use extract to get the result ..But how exactly to use extract here I dotn know..
The other method is a easier method.. which involves creating your own function which uses substr ..and instr
It shal lsearch for <organisation_name> and find the orgonizatio..
I dont know which approch is betTER .. I find making my own customised function a easier and better way..
But any one has idea on extract function ..please let me know..
Db version is 11g
Any information shall be appreciated
ThanksHi Thanks Marco, and odie
Tried it.. some synatx issues..
Was trying to understand about these functions..
This is the structure of my table ..
desc xml_data_tab
Name Null Type
XML_DATA XMLTYPE()
This is the xml data
<?xml version = '1.0' encoding = 'UTF-8'?><CraftyResponse>
<address_data_paf_compact>
<thoroughfare_count>1</thoroughfare_count>
<thoroughfare>
<delivery_point_count>5</delivery_point_count>
<delivery_point>
<organisation_name>THE BAKERY</organisation_name>
<department_name></department_name>
<po_box_number></po_box_number>
<building_number>1</building_number>
<sub_building_name></sub_building_name>
<building_name></building_name>
<udprn>12345678</udprn>
</delivery_point>
<delivery_point>
<organisation_name>FILMS R US</organisation_name>
<department_name></department_name>
<po_box_number></po_box_number>
<building_number>3</building_number>
<sub_building_name></sub_building_name>
<building_name></building_name>
<udprn>12345679</udprn>
</delivery_point>
<delivery_point>
<organisation_name>FAMILY BUTCHER</organisation_name>
<department_name></department_name>
<po_box_number></po_box_number>
<building_number>7</building_number>
<sub_building_name></sub_building_name>
<building_name></building_name>
<udprn>12345680</udprn>
</delivery_point>
<delivery_point>
<organisation_name></organisation_name>
<department_name></department_name>
<po_box_number></po_box_number>
<building_number></building_number>
<sub_building_name></sub_building_name>
<building_name>BIG HOUSE</building_name>
<udprn>12345681</udprn>
</delivery_point>
<delivery_point>
<organisation_name></organisation_name>
<department_name></department_name>
<po_box_number></po_box_number>
<building_number>17</building_number>
<sub_building_name></sub_building_name>
<building_name>LITTLE COTTAGE</building_name>
<udprn>12345682</udprn>
</delivery_point>
<dependent_thoroughfare_name></dependent_thoroughfare_name>
<dependent_thoroughfare_descriptor></dependent_thoroughfare_descriptor>
<thoroughfare_name>HIGH</thoroughfare_name>
<thoroughfare_descriptor>STREET</thoroughfare_descriptor>
</thoroughfare>
<double_dependent_locality></double_dependent_locality>
<dependent_locality>CRAFTY VALLEY</dependent_locality>
<town>BIG CITY</town>
<postal_county>POSTAL COUNTY</postal_county>
<traditional_county>TRADITIONAL COUNTY</traditional_county>
<postcode>AA1 1AA</postcode>
</address_data_paf_compact>
</CraftyResponse>
Edited by: susf on Aug 29, 2012 7:00 PM -
good evening every one,
i am new to plsql can anyone verify my coding what is wrong in my coding......
declare
countr varchar2(2); countr := &country varchar(2);
cc varchar(3);
l_en varchar(50);
ab nvarchar2(50);
begin
select countrycode.rrl,langname_en.rl,abrivation.rl into cc.rrl,l_en.rl,ab.rl from res_language rl inner join res_relcountrylan rrl on rl.langid=rrl.langid where countrycode=countr;
end;
thanking you,
prakashPrakash T Soundappan wrote:
good evening every one,
i am new to plsql can anyone verify my coding what is wrong in my coding......
declare
countr varchar2(2); countr := &country varchar(2);
cc varchar(3);
l_en varchar(50);
ab nvarchar2(50);
begin
select countrycode.rrl,langname_en.rl,abrivation.rl into cc.rrl,l_en.rl,ab.rl from res_language rl inner join res_relcountrylan rrl on rl.langid=rrl.langid where countrycode=countr;
end;
thanking you,
prakashThere are multiple problems with your code
declare
countr varchar2(2); countr := &country varchar(2); -- 1. You declared the same data name twice
cc varchar(3); -- it should be countr varchar2(2) := '&country';
l_en varchar(50);
ab nvarchar2(50);
begin
select countrycode.rrl -- 1. If this is returns more than 1 row you will get a run time error
,langname_en.rl -- 2. It's table_alias.column_name not the other way round, so rrl.countrycode
,abrivation.rl
into cc.rrl -- 3. cc, l_en, and ab, no .rl or .rrl on the end
,l_en.rl
,ab.rl
from res_language rl
inner join res_relcountrylan rrl on rl.langid=rrl.langid
where countrycode=countr;
end;Like I said if that select returns more than one row you will get a run time error. You may have to make arrays of your variables and do bulk collects, or set up a loop to process all the rows. -
Reports 6i - doubt in executing plsql
Can any 1 pls help how to execute the report from plsql or scheduled job and not from a form
I have a report that works fine, The concern now is that somebody will have to manually run this process. It should be something automated, wherein it will run on it's own
Some batch job which will trigger automatically as per the pre defined schedule
Thx in advance
ImranGenerally with these sort of things we have a Windows Scheduled Task set up on the server (or I suppose cron on a unix server). Setting up something inside the database to call an Oracle Report on a scheduled basis is way more fiddly than it needs to be.
-
i need these two. .
1) an interviewer asked me that what is the need of pipelining even though i can return a collection with normal function?
2)when we call an sql statement in a plsql . what is the type of context switch will raise i.e the statement type context switch or data context switch.1) an interviewer asked me that what is the need of pipelining even though i can return a collection with normal function?Pipelining negates the need to build huge collections by piping rows out of the function as they are created, saving memory and allowing subsequent processing to start before all the rows are generated.
-
Doubt regarding plsql certification exam
hello to all
i passed out sql exam of ocp
Test Title: 1Z0-007 Introduction to Oracle9i: SQL on
may 2004.
now i want to write the plsql exam..i have the following
questions.
1)what is the name of the exam i should write now?
2) will there be latest exam guide books available for
preparing for exams?
like i have a book called
oracle ocp developer plsql program units exam guide(1z0-101)
so now if the plsql exam is 1z0-047, then will i get a new exam guide
book for the same?
i want be an oca, and so i want to write the plsql exam,
and i want to know the oracle press book (exam guide book)
which should help me.
and if any one of you have any questionnaires of plsql exam..
please do email me at [email protected]
GautamHi gautam,
I have just joined the forun and this is my first post.
I am also currently preparing for the OCA exam 1Z0-007.
the cert path is as:
Oracle9i Database: Introduction to SQL (#1Z0-007)
Oracle9i Database: Fundamentals I (#1Z0-031)
=====you get an OCA=====
Oracle9i Database: Fundamentals II (#1Z0-032)
Oracle9i Database: Performance Tuning (#1Z0-033)
=====you get an OCP=====
Gautam i am working full time and prepare for the exam only during free time.
I dont have an Oracle 9i installed on my machine.Can you plez tell me an Oracle DB resource server so that i can access it thru iSQL(browser) and practice out.
Thanx & Regards
Asheesh -
Plsql - varray in a varray doubt/issue
Hi,
My Oracle version:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
"CORE 11.2.0.1.0 Production"
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
Please find the code below:
create or replace
procedure p_varray_test
AS
type t_va_emp_group_sal is varray(10) of number(9);
type t_2d_VA is varray(2) of t_va_emp_group_sal;
L2DVAv_test t_2d_VA := t_2d_VA(t_va_emp_group_sal(11,12,13,14,15,16,17,18,19));
begin
L2DVAv_test.extend;
L2DVAv_test(2)(1) := 21;
dbms_output.put_line(L2DVAv_test(2)(1));
end;
its getting compiled but when I am trying to run it, I am getting the following error:
ORA-06532: Subscript outside of limit
please help me with this issue.
Now if I modify the code something like this:
create or replace
procedure p_varray_test
AS
type t_va_emp_group_sal is varray(10) of number(9);
type t_2d_VA is varray(2) of t_va_emp_group_sal;
L2DVAv_test t_2d_VA := t_2d_VA(t_va_emp_group_sal(11,12,13,14,15,16,17,18,19),t_va_emp_group_sal(11,12,13,14,15,16,17,18,19));
begin
L2DVAv_test.extend;
L2DVAv_test(2)(1) := 21;
dbms_output.put_line(L2DVAv_test(2)(1));
end;
this code is perfectly working fine for me but I want to understand why am i getting the error above.
Regards
RahulLet's start with your second (working) example first:
L2DVAv_test t_2d_VA := t_2d_VA(t_va_emp_group_sal(11,12,13,14,15,16,17,18,19),t_va_emp_group_sal(11,12,13,14,15,16,17,18,19));Now you have an "outer" varray initialized with two elements. Each of those two elements are initialized with an "inner" varray each with 9 elements.
L2DVAv_test.extend;The "outer" varray has now been extended with a third element. That third element is as yet not initialized.
L2DVAv_test(2)(1) := 21;The value of first element of the "inner" varray in the second element of the "outer" varray is changed to 21.
So "11" in your second t_va_emp_group_sal expression is changed to 21.
Now your first example:
L2DVAv_test t_2d_VA := t_2d_VA(t_va_emp_group_sal(11,12,13,14,15,16,17,18,19));Now you have an "outer" varray initialized with one element. That single element is initialized with an "inner" varray each with 9 elements.
L2DVAv_test.extend;The "outer" varray has now been extended with a second element. That second element is as yet not initialized.
L2DVAv_test(2)(1) := 21;L2DVAv_test(2) will get you the second element of the "outer" varray.
But that element is not yet initialized, so you cannot reference "the first element of the inner varray" here.
But this should work after your extend:
L2DVAv_test(2) := t_va_emp_group_sal(21);Now you are initializing an "inner" varray with one element and assigning that newly initialized varray to become the second element of the "outer" varray. -
hai...
i have a table like this...
PROCEDURE SHOW_UNSTRUCTURED_EDIT
Argument Name Type In/Out Default?
P_TEMPLATE_ID NUMBER IN DEFAULT
P_TEMPLATE_NAME VARCHAR2 IN DEFAULT
PROCEDURE SHOW_UNSTRUCTURED_PREVIEW
Argument Name Type In/Out Default?
--------------------------------------------- P_TEMPLATE_ID NUMBER IN
P_TEMPLATE_NAME VARCHAR2 IN
i tried like this
SQL> @show_unstructured_preview
SP2-0310: unable to open file "show_unstructured_preview.sql"
SQL>show procedure <procedurename>
unknown SHOW option "procedure"
unknown SHOW option beginning "_unstructured
how do i solve this problem
kindly help me
thanks in advance
haihai...
i am using oracle portal 3.0.8.9
there are many default portal objects
which comes along with default portal user
PORTAL30. i tried running a DESC statement
upon one of these objects "WWV_UI_TEMPLATE"
THIS IS THE PART OF THE OUTPUT I GOT WHEN I
GAVE THE DESC
DESC WWV_UI_TEMPLATE
PROCEDURE SHOW_UNSTRUCTURED_EDIT
Argument Name Type In/Out Default?
P_TEMPLATE_ID NUMBER IN DEFAULT
P_TEMPLATE_NAME VARCHAR2 IN DEFAULT
PROCEDURE SHOW_UNSTRUCTURED_PREVIEW
Argument Name Type In/Out Default?
--------------------------------------------- P_TEMPLATE_ID NUMBER IN
P_TEMPLATE_NAME VARCHAR2 IN
now the problem is i want to view the contents of the procedure SHOW_UNSTRUCTURED_PREVIEW which is a part of the above table...
when i try executing the procedure it's not
working.
how do i do this
regards
hai -
hi guru's.
i have a doubt in plsql performnace, i have been using many GTT in my project now, i feel to remove all GTT's intead of i plan to introduce collections.
is it really improve the performance, i am thinking to avoid the context-switch?Memory usage depends mainly on WHAT is processed, and partly by WHICH means it is processed.
So if you process a lot of data, it possible to lead nearly every report to dump.
Your information is much to poor to say more.
Siegfried -
How to handle the plsql error occuring in the exception block
We know how to handle exceptins which occur in BEGIN block.
But am unable to catch the exception in the exception block. Am writing an erroeneous code so that the control will go to exception block and there is also one plsql error, but am unable to handle that error, it's returning the error to the calling environment.
DECLARE
cnt NUMBER(5):=0;
BEGIN
select 'debalina' INTO cnt from dual;
DBMS_OUTPUT.PUT_LINE(to_char(cnt));
EXCEPTION
WHEN invalid_number THEN
DBMS_OUTPUT.PUT_LINE('error has occured inside begin block');
cnt:='deba';
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('error has occured inside begin block');
END;
please suggest me how to catch this exception?Hi,
DECLARE
cnt NUMBER(5):=0;
BEGIN
select 'debalina' INTO cnt from dual;
DBMS_OUTPUT.PUT_LINE(to_char(cnt));
EXCEPTION
WHEN invalid_number THEN
DBMS_OUTPUT.PUT_LINE('error has occured inside begin block');
cnt:='deba';
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('error has occured inside begin block');
END;
First of all your namee exception which you have posted i.e invalid_number itself is wrong.
You need to use named exception VALUE_ERROR for catching the exception in the main block.
SQL> DECLARE
2 cnt NUMBER(5):=0;
3 BEGIN
4 select 'debalina' INTO cnt from dual;
5 DBMS_OUTPUT.PUT_LINE(to_char(cnt));
6 EXCEPTION
7 WHEN Invalid_number THEN
8 DBMS_OUTPUT.PUT_LINE('error has occured inside main block');
9 end;
10 /
DECLARE
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at line 4
SQL> DECLARE
2 cnt NUMBER(5):=0;
3 BEGIN
4 select 'debalina' INTO cnt from dual;
5 DBMS_OUTPUT.PUT_LINE(to_char(cnt));
6 EXCEPTION
7 WHEN VALUE_ERROR THEN
8 DBMS_OUTPUT.PUT_LINE('error has occured inside main block');
9 end;
10 /
error has occured inside main block
PL/SQL procedure successfully completed.Your doubt regarding catching the exception in exception block, you can execute as below, by nesting a Begin block inside the exception block itself.
SQL> DECLARE
2 cnt NUMBER(35):=0;
3 BEGIN
4 select 'debalina' INTO cnt from dual;
5 DBMS_OUTPUT.PUT_LINE(to_char(cnt));
6 EXCEPTION
7 WHEN Value_error THEN
8 DBMS_OUTPUT.PUT_LINE('error has occured inside main block');
9 Begin
10 cnt:='deba';
11 Exception
12 WHEN OTHERS THEN
13 DBMS_OUTPUT.PUT_LINE('error has occured inside exception block');
14 End;
15 END;
16 /
error has occured inside main block
error has occured inside exception block
PL/SQL procedure successfully completed.Hope your doubt is clear.
Twinkle -
Clarification needed in calling synchronous bpel process from plsql
Hello all,
I am trying to a bpel from the plsql function as given in the folowing link:
http://orasoa.blogspot.com/2006/10/calling-bpel-process-from-raw-plsql.html
I have a doubt that, what is: p_DefaultDetail ?
and what is XMLTRANSFORM method here is used for?
I am getting an error that XMLTRANSFORM is not detected.
can any one provide some pointers to get it resolved.
Thanks
KrrishIf you install the database you also have the option to install optional components. One of these is the xmldb (or some support for it in the database , dunno how to call it).
So i guess you need to install this extra component and you're there (assuming Marc his reply on the question where to find the xmltransform function is correct :)) -
Hi
I recently faced an interview below are some of the questions I was unable to answer confidently.
Please can you answer these:
1. In an Explain plan, what does the columns "Time" and "Rows" suggest? Is it the actual time the query should take and the actual number of rows it should return? Or something else?
2. I have a Select, Insert, Update and Delete grants on a table. Which of these I can do:
a. Create a trigger for (Insert or Update or delete) on that table.
b. Create a trigger on view of that tabe.
3. There are 2 triggers on a table (before Insert on that table). The only difference between 2 triggers is - one is row level, other is statement level.
Now If i try to insert data in that table, which of these triggers will be fired?
4. I have a table with 90 million records. I want to delete some 60 million records randomly. What is the most efficient way to do this? [Can use PLSQL as well]
Thanks
ABfirst Thanks you for your reply
1. You do not explain what CTAS means, Hoek does. For anyone that is unfamiliar with that acronym they won't be able to understand what you mean. And if someone does know what CTAS means they may still not know how creating a new table will result in data being deleted from the original table.yes i does not explain, because Hoek already explained and i do not fit sochel
2. You stated 'ctas method will be best' almost as if it were a fact and there couldn't be any doubt about it. Hoek hinted that there might be another way that 'could' be faster. Many things Oracle are not so cut & dried and often part of the answer will be 'it depends'. All anyone needs to do is find ONE exception to the rule to disapprove it.yes you are right, I just did not put it quite clear
3. You do not provide ANY explanation as to how a CTAS solution, which creates a new table, would end up DELETING data in the orginal table as OP asked. Hoek provided two links to an authoritive source that provides an explanation and example. in the topic was not a specific question about how to remove data from a large table, I just gave direction, sometimes the for topic creators , that it is always better to seek and find ownself to be more useful than giving an ready answer
I'm only saying the above to make a point to try to help you provide even better, and more complete, answers in the future. Thank you
People that are familiar with CTAS and have used it to effect a DELETE of rows from a table (including yourself) will understand what you probably meant just because you said 'CTAS'.
But your answer won't be much help to anyone else. They will need to search 'CTAS' on the net. And that alone won't help them get an understanding of the many other issues that need to be taken into account if you choose to use ctas to effect a delete by actually using the new table that you create:
1. the data may wind up in a different tablespace
2. the resulting table may not wind up being identical to the original table
3. issues with constraints on the existing table that either can't be created on the new table or can't be created with the same name
4. issues with grants on the existing table that will need to be recreated on the new table
5. issues with code references on the existing table - that code will be invalid if the existing table is dropped and will need to be recompiled if the new table is renamed to use the original name.
For some use cases the effects of one or more of those issues above will outweigh the speed improvements that CTAS might provide.Again, I believe that, in such matters is always better to redirect people than explain all things, because when people searching and finding own problem ownself, he/she will understand solution better than we explain him/her.
Thanks again -
How can i connect a printer through PLSQL for taking printouts
Hi,
I want to take a printout of the specified file through PLSQL. Pls give u'r idea.
Thanks
SureshDear Suresh
Can you please be specific about your doubt.
What kind of file you want to take a printout. you mean to say any script file or the output of a select statement or something else.
please state clearly what is your requirement
Cheers
Prakash Eranki -
Interpretting HASH_MAP to PLSQL
Hello All,
My oracle version in 10.2.0.4 on a solaris V880 machine.
Our Application Java SDK is 1.4.
I am trying to pass in a series of XML (considerably huge for XML type column) from java application plsql which stores them into an oracle table with column as external BLOB. Since the contents are so heavy for each objects , using XMLTYPE column is not feasible.
The xml files comes as either java hash_map or string which i have to pass as parameter to an Oracle stored procedure which stores as external BLOB in OS through a table.
My first doubt is this the correct approach.
My second doubt here is how to interpret java hash_map object within PLSQL when it is passed to it.
Apologies if the question is silly since i am a new comer to java.
Thanks in advance ,
Vijay GIs it possible to just get the file name "reaper"from it instead of reaper.txtActually, I ran a test, and
System.out.println( "file name portion == " + ( f.getName().split( "\\." ) )[ 0 ] );works also:
This has the same effect as:
String fileName = f.getName();
String splitFileName[] = fileName.split( "\\." );
System.out.println( "file name portion == " + splitFileName[ 0 ] );Now that I think about it, the second form is more easily understood. There is really no reason to do it the first way. Just interesting to note that you can. -
Plsql code to insert data in table
HI
I want to write a procedure in such a way that
If IMDMMANUFACTURER_VM table exit
then
insert into IMDMMANUFACTURER_dummy table from IMDMMANUFACTURER_VM
else
insert into IMDMMANUFACTURER_dummy table from IMDMMANUFACTURER table
how I write the code in plsql?
Thanks in advHi Blu
i accept there is a declaration error there.. but Blu.. it had worked for me... then one
doubt , why we have to use Dynamic SQL for a DML statement even after knowing all the parameters of the
statement.
Pl correct me if my perspective is wrong
SQL*Plus: Release 9.0.1.0.1 - Production on Mon Sep 15 20:06:10 2008
(c) Copyright 2001 Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production
With the Partitioning option
JServer Release 9.0.1.1.1 - Production
SQL> select table_name
2 from all_tables
3 where table_name like 'emp_aasi%';
no rows selected
SQL> desc test1;
Name Null? Type
A VARCHAR2(4)
B NUMBER(2)
SQL> select * from test1;
no rows selected
SQL> DECLARE
2 v_count NUMBER;
3 BEGIN
4 v_count :=0;
5
6 SELECT COUNT(1) INTO v_count
7 FROM All_Tables
8 WHERE table_name='emp_aasign';
9
10 IF v_count > 1 THEN
11 INSERT INTO test1 ( SELECT '1', '2' FROM dual);
12 ELSE
13 INSERT INTO test1 ( SELECT '3', '4' FROM dual);
14 END IF;
15 END;
16 /
PL/SQL procedure successfully completed.
SQL> select * from test1;
A B
3 4
SQL>
Maybe you are looking for
-
BAM getting random timeouts calling BPEL web service as alert rule
I have a BAM alert rule set up to call a BPEL process (web service call basically). This is part of our custom error notification and escalation solution. In production I randomly see timeouts in the BAM event engine logs where the web service call h
-
Macbook Pro fails to boot after any OS update.
Hi, I've been a PC user all my life so please be patient! I have a mid 2010 MBP running 10.6.3 with Win7 on a boot camp partition. I have read and followed the instructions regarding boot issues from many sources on these forums but nothing so far ha
-
Error restarting OBIEE 11g services
Hi, I am getting an error to restart services in obiee11g in unix server. There are couple of errors like : 1.Operation Failed: start; OracleInstance: instance1; Component: coreapplication_obips1; msg: 0 of 1 processes started. 2.Error in starting co
-
BPM error: interface are not same
Hi, In my BPM I opened a Asy/syn bridge. When I close it I get the error: A interface and B interface are not the same. A is the interface (synch) which I used on the sender side when I opened the bridge. B is the aynch. abs. interface for the receiv
-
My iCloud Notes aren't getting synched to my iPhone Notes?
I have created some notes in my iPhone. When I am checking my iCloud, my notes aren't available there. My iCloud notes are blank.