Skip to content
Advertisement

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 be n2:=&n2; else

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 last year. Improve this question I

Oracle Like Operator in Where condition and decode

I’m trying to write a PL-SQL query to return records from multiple table and using decode to allow null value comparison, The result is returning only where DeptName is exactly matching to the database values, but I want a query to return something e.Department like ‘%DeptName%’ Answer No need for anything other than boolean logic: If you want a NULL

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 queries, just list all your

how to drop multiple functions in Oracle

I want to drop multiple functions from my database at a time in Oracle’s SQL developer. Is anyone has an idea how to create a script for that? Answer Well, the static option to drop the functions (sometimes considered more secure as you can double-check what you are removing) consist of two steps 1 – run the following query 2

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 if any update failure). Answer

Advertisement