Skip to content

Tag: plsql

SP2-0552: Bind variable “N3” not declared

This is a code for comparing three numbers and to print the greatest value. When i try to run this pl sql code in oracle it says Can u tell me where it is wrong???I would be very grateful Answer You have 3 errors (typos): You need the DECLARE keyword before you start declaring variables. n2:=&n2: should b…

To check whether entered number is odd or even in PL/SQL [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed las…

spool to .csv file using for loop

need to spool output into .csv file using loop, fyi…I have data in 4 diff partition. but no sure how to proceed. code be like. result:- not sure if I am spooling properly, also please check the index variable of for loop in used correctly in my select statement. Answer You don’t need 4 different q…

how to rollback tran when error occur in oracle

i try to solve 2 requests below but i only code for the first one,, can any one help to solve the second one Write SQL statements using cursor to update salary of all employees base on update conditionals Make sure all update records have been updated completely. The database transaction will be rolled back i…