Skip to content
Advertisement

Tag: plsql

Returning values from 2 select statements in Oracle Procedure

Homework question that I’m stuck on. I need to create a Procedure called dept_info with a department id as the IN parameter with department name and full name (concat of first and last name) of the manager of that department as the OUT parameters to be passed back to the invoking program. the procedure should be within the PL SQL

Using declared variables in SQL Oracle query FOR LOOP

I’m attempting to write a query script where I declare a variable and then use them in a select statement in Oracle SQL. Basically script should check if parent tables’ entries are used in referenced table or not. if not –> delete the entry from REF table. So far I have this So far LOG_MSG(‘Parent table: ‘ || tableName.table_name ||

how to fetch email address from oracle database

Hi All i am trying to fetch certain email patterns from oracle db 11g i have used the below queries Unfortunately i have to scan through the complete schemas in order to fetch the value (@pqr.de) where ever it exists in which ever column and table it is residing , ideally this activity is to list out inactive email addresses

Oracle XMLTYPE extract root prolog value

I have sample Query with XML like below: Output: I am trying to fetch the values below within the query or a new query: Is there any way to do that? Any help / direction appreciated. Answer You just have to complete your first XMLTABLE query (h) in this way:

How to Loop department names

Oracle SQL Developer I want to Loop department id and department names starting from dep_id = 10 and till 50th department. Departments are increasing by 10, so, there are 5 departments from 10 to 50. Here’s my code And here is the output, But as you can see the Administration row is repeating itself. The output should be like this

Error(8,1): PLS-00103: Encountered the symbol “SET”

I’m trying to create a function using oracle, it should be working fine but i keep getting the following error: Error(8,1): PLS-00103: Encountered the symbol “SET” here is my Function: Answer The problem is where do you put this command: SET SERVEROUT ON; cause its inside the function declaration. You should try to take it outside the function:

Advertisement