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 are date and time intervals? : Sql dba

645


What is data control language (dcl)?

702


What is difference between joins and union?

628


What is asqueryable?

617


what is cursor. write example of it. What are the attributes of cursor.

839






How does stored procedure reduce network traffic?

629


What are the three pl sql block types?

651


How we can update the view?

686


What is difference between procedure and trigger?

603


What is difference sql and mysql?

620


How would you reference column values before and after you have inserted and deleted triggers?

708


table structure: ---------------- col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 01-mar-2012 11:12:46 01-mar-2012 11:11:23 Write a query to display the result as shown below: col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10

3533


What is Collation Sensitivity ? What are the various type ?

601


What are tuples in sql?

687


What is difference between function and trigger?

631