I created the following type: Inside of a procedure then I accept this parameter and want to loop through it: I keep getting this error though: Answer It is possible that you want to create a collection type and then pass that collection to your procedure If that is not what you are looking for, please edit your question to
Tag: plsql
Get Current Week/Month Dates
I want to make function get dates of current week. I will pass week start date number dynamically.Week start date can change.It can be sunday or monday or any day.I shoud be able to pass week start date number dynamically. If i Call function GetCurrentWeekDates(weekStartDay NUMBER,callingday Date),i should get the result like the following GetCurrentWeekDates(1,’10/04/2022′) –1 is sunday Result should
Found the symbol “CREATE” instead of
I don’t know why it gives me this error: Error(3,3): PLS-00103: Found the symbol “CREATE” instead of one of the following: ( begin case declare exit for goto if … I tried using the backslash, but it doesn’t solve the problem, any help? Answer You cannot use DDL statements in PL/SQL. You need to use EXECUTE IMMEDIATE and cannot use
How to compare old value and new value in triggers and then mark as insert/update/delete in audit table
My Attempt: When I have inserted one record for ref_id into the table source_Det then in the audit table I am getting two records but ideally, it should check and load only that value which is newly inserted. Current Output: Expected Output: Basically, I need to check two columns ref_id and sys_other. If only ref_id entered by user or modified
PLS-00103 error while executing a sql block (Encountered the symbol “SELECT” …)
I’m trying to learn PLSQL and this is a code that I been trying to execute, When I execute the code I get the following error. I know you can assign a variable to the select statement and use that variable in IF statement, I just want to know the error in the following code. Answer OR with a variable
Not able to create a matrix in PL/SQL using nested tables
I was trying to create a matrix in PL/SQL using nested tables as such: firstly, I create a table type that is able to store varchars (that in my case is name lista_principala) secondly, using the previously declare table type lista_principala I try to create a table type that contains items of type lista_principala. I don’t think that I’m wrong
PLS-00225 subprogram or cursor ” reference is out of scope when try to read column names
I’m trying to return the column names and the value as a pair key/value like this: column_name | column_value dep_id | 1 dep_name | ‘Test’ dep_create_date | ’08-25-2021′ When I execute this block, I got the following error message: Error report – ORA-06550: line 6, column 22: PLS-00225: subprogram or cursor ‘C_DEPT’ reference is out of scope ORA-06550: line 6,
Using Cases for currency conversion in oracle
I have two tables what I am trying to find is the ‘daily amount GBP Equivalent per day for the last three months’. For example on date ’05/01/2022 ‘ check the given amount in Payments_history table if the currency is GBP add it into total and move on to the next payment, next if the currency is in USD check
To find passengers travelling more than thrice on the same route in PL/SQL
Here I am creating three tables, one for storing the Train Info. Another for holding onto the Passenger info and the other one to hold the ticket Info. In the Train_Info table, I am inserting two unique routes with the same source and destination as there can be different routes for the same source and destination. And filling the other
CASE statement in WHERE CALUSE – Missing keyword error
I have list of products which gets renewed on monthly or yearly or both. If the renewal value is ‘M’ then the product is renewed on monthly basis. If the renewal value is ‘Y’ the the product is renewed on yearly basis. So my query is, If I choose method(M/Y) and a particular date(P_date), I want the details of products