View Exhibit1 and examine the structure of the DO table.
View Exhibit2 and examine the code.
The anonymous block gives an error on execution. What Is the reason?
A.
The assignment in line 7 is not valid.
B.
The SQL does not support the Boolean data type.
C.
A null value cannot be applied to the bind arguments In the using clause in line 10
D.
The names of bind variables must be the same as the using clause bind arguments in line 10
Explanation:
A is the reason and B is the explanation
DECLARE
FUNCTION f (x INTEGER)
RETURN BOOLEAN
AS
BEGIN
…
END f;
dyn_stmt VARCHAR2(200);
b1 BOOLEAN;
BEGIN
dyn_stmt := ‘BEGIN :b := f(5); END;’;
— Fails because SQL does not support BOOLEAN data type:
EXECUTE IMMEDIATE dyn_stmt USING OUT b1;
END;
http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/dynamic.htm#BHCEJIDC
HI VISHES, THANKS OF YOUR COMMENT AND LINK,
but i don’t think you are right….
my opinion is
the erroro is line 8 EXECUTE IMMEDIATE dyn_stmt USING OUT v_job;
and not line 7 (the assignement)
thanks of this beatiful brain opportunity
Piero
I agree with you. Answer: B
B is the ans
B
B
as is written vishes bansal
A is the reason and B is the explanation
BUT
WICH ONE IS THE RIGHT ANSWER ???????????????????????
IT’S NOT THE 7 (THE ASSIGN) LINE, BUT IT’S THE 8 (tHE EXECUTE IMMEDIATE) WHN REFERS
V_JOB BOOLEAN VARIABLE…
create or replace function job_chk (p_empno NUMBER)
return boolean is
v_job emp.job%type;
begin
select job into v_job from emp WHERE EMPNO = p_empno;
if v_job = ‘SALESMAN’ THEN
RETURN TRUE;
else
RETURN FALSE;
END IF;
END JOB_CHK;
DECLARE
v_job BOOLEAN;
dyn_stmt VARCHAR2(200);
V_COMM number := NULL;
v_empno emp.empno%type;
BEGIN
dyn_stmt := ‘BEGIN :v_job := job_chk(100); END;’;
EXECUTE IMMEDIATE dyn_stmt USING OUT v_job;
IF v_job THEN
EXECUTE IMMEDIATE ‘UPDATE emp SET conn = 😡 WHERE empno = :y’
USING v_conn, v_empno;
END IF;
END;
ORA-06550: line 8, column 41:
PLS-00457: expressions have to be of SQL types
ORA-06550: line 8, column 4:
PL/SQL: Statement ignored
ORA-06550: line 11, column 16:
PLS-00201: identifier ‘V_CONN’ must be declared
ORA-06550: line 10, column 4:
PL/SQL: Statement ignored
B
B
Every as soon as inside a although we pick blogs that we read. Listed below would be the most current web sites that we decide on
One of our guests not too long ago suggested the following website.
Wonderful story, reckoned we could combine several unrelated information, nevertheless actually worth taking a search, whoa did one study about Mid East has got far more problerms as well
The data mentioned inside the article are some of the best out there
please visit the web pages we follow, which includes this a single, as it represents our picks through the web
Sites of interest we’ve a link to
below you will discover the link to some websites that we assume you ought to visit
check below, are some absolutely unrelated web-sites to ours, even so, they may be most trustworthy sources that we use
Every after inside a though we pick out blogs that we read. Listed below are the newest sites that we decide on
one of our visitors not too long ago suggested the following website
Sites of interest we have a link to
the time to study or check out the material or web-sites we have linked to below the
although sites we backlink to beneath are considerably not connected to ours, we feel they may be actually worth a go by means of, so have a look
The data talked about inside the report are several of the ideal readily available
Wonderful story, reckoned we could combine some unrelated information, nonetheless genuinely worth taking a search, whoa did 1 discover about Mid East has got extra problerms too
one of our guests a short while ago encouraged the following website
one of our guests just lately suggested the following website
always a large fan of linking to bloggers that I really like but really don’t get lots of link enjoy from
usually posts some incredibly exciting stuff like this. If youre new to this site
always a significant fan of linking to bloggers that I appreciate but really don’t get lots of link appreciate from
always a large fan of linking to bloggers that I adore but dont get a lot of link love from
the time to read or visit the subject material or sites we’ve linked to below the
Every after inside a even though we select blogs that we read. Listed beneath would be the latest internet sites that we choose
b