Skip to content
Advertisement

Tag: plsql

Executing view within a stored procedure

Is it possible to execute a view with a stored procedure? My procedure should first run the views (I have 2 in total) and then am combining these 2 views data into a different table for applying transformations. Something like this: Answer What do you call “execute a view with stored procedure”? How are views “triggered”? If you meant to

How to search for a month that is input by the user

I am working on some homework and have been stuck on this for a week. I have tried using TO_CHAR, MONTH(search), and EXTRACT(MONTH from…) and they all end up with either identifier ‘JAN'(the month I am searching for) is not declared, or expression is of the wrong type. This assignment is to display all the rows for pledges made in

Creating a trigger with SELECT Function

Good day everyone, I’m having trouble making my trigger work. As far as the functionality of the body and how it behaves, it does exactly as I intended for it to behave. However, when I start to fire the trigger, it returns an error in which Triggers should not have a SELECT statement from inside the main body. I’m still

Extracting multiple values from BLOB as XML

I have an XML like this in a BLOB column: As you can see the year can be either in the event level or at country level. There can be multiple events and multiple countries per event. This whole XML is stored in a BLOB column in Oracle. I need to extract the value of the year or better check

Sum up all values from a list PLSQL

I want to sum up all values from a INDEX BY TABLE list. In the list there are values like this: 24000, 4500, 7890 and so on. This is the code: Answer Lets assume that you have an associated array and you want to sum up the values within it. And, lets also assume that the associative array’s index is

subquery calculate days between dates

Sub query, SQL, Oracle I’m new to sub queries and hoping to get some assistance. My thought was the sub query would run first and then the outer query would execute based on the sub query filter of trans_code = ‘ABC’. The query works but it pulls all dates from all transaction codes, trans_code ‘ABC’ and ‘DEF’ ect. The end

Reading BLOB column in oracle table

I have a table tbl which has below columns: When I run below query it works fine: But when I run below it throws error: I mean to say, if I select only 1 blob column to read , then date filter works fine. But when I select both BLOB columns with date filter in where clause, it throws below

Advertisement