Dear All,



Question for this Week



Find out possible error(s) (either at compile
time or at runtime) in the following PL/SQL block. State
the reason(s) and correct the errors.



Declare

Cursor C1 is select ename, sal, comm from emp;

Begin

For i in C1 Loop

If i.comm between 299 and 999 then

Dbms_output.put_line(i.Ename || ‘
** Good Commission’);

Elsif i.comm > 999 then

Dbms_output.put_line(i.Empno || ‘
** Very Good Commission’);

close C1;

Else

Dbms_output.put_line(i.Ename || ‘
** ’ ||nvl(i.comm,‘O’));

End if;

End Loop;

End;

Answer Posted / intejar ahmad

invalid single quotes and cursor does not selecy empno

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is normalisation and its types?

550


What is the advantage of index in sql?

541


How do I audit the sql sent to the server?

526


What is the limitation on the block size of pl/sql?

532


What is compiled query?

522






Which software is used for pl sql programming?

523


Can we use rowid as primary key?

548


What is the benefit of foreign key?

528


How to rename a table?

558


Explian rowid, rownum? What are the psoducolumns we have?

574


how can we submit a form without a submit button? : Sql dba

539


Why do we need view in sql?

551


Hi how to import oracle sequence in Informatica? Please write stored procedure code that will import oracle sequence in Informatica SP transformation as per below scenario Oracle table product list Pro_id, pro_name 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights Now a new flat file with new product list needs to be added to oracle table product list with oracle sequence. flat file product Prono,pro_name, 1, 20 watt tube light 2, 30 watt tube light & target should be like 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights. 104, 20 watt tube light 105, 30 watt tube light thks reg suvarna joshi suvarnaatsuvarna@rediffmail.com

2071


When should I use nosql database?

553


What are the different sql languages?

543