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
Tag: plsql
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
SQL* Is there a way to make a procedure that will verify what time and day?(Beginner) SQL*
It’s for a school project and I know it may seems basic but I’m wondering how to make a procedure that will verify what time and day it’s actually is like monday and not the date. thank you Answer Please use this – Pls note, you can use ‘DAY’ to get all caps, ‘Day’ to get initcaps. There are whole
ORA-04091 TABLE ODB.EMPLOYEE IS MUTATING, TRIGGER/FUNCTION MAY NOT SEE IT. IS THERE SOMETHING WRONG WITH MY TRIGGER?
Trying to create a trigger when there is an update of Status on Employee Table and capture some values for the record in Employee table and Employee_Header table for that record and send an email. The trigger throws an error. Answer You can’t select from a table which is just being changed; it is mutating. Though, as you can use
How to test PL/SQL procedure with varray input
I’ve made a procedure that uses a varray as input, and while everything compiles correctly, I can’t figure out how exactly to test/execute the procedure that actually works. The varray takes in at …
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
Failing to produce or update a table row using a trigger in SQL
I am trying to create a trigger in Oracle SQL 12c. The concept is that i have two tables, a storage table (Storage) that holds items and a delivery table (Supplier_Orders) that notes how many items(…
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