Skip to content
Advertisement

Tag: plsql

How to update table in pl/sql?

Example contrived for this question. Two tables, Project and Employee. Employee has a project id foreign key. Query needs to select all the projects that are of year 2021 with ongoing status in Employee table for each record from above select statement (1), create a new row in project table and set year to 2022. Get project Id (step 3)

Partial Group Filter

Oracle 11g How can I get ALL pet_owners of FURRRY and SCALY and only earthworms and slugs ? Answer You want either of the two conditions to be met, so you need OR:

Group By function

hope you all having a great day. I need some help with this query. Just to explain the situation, I have to send e-mails containing the data found in this select, but I have to group by customers (TBLOTE.CEMPRES) so it would build a single e-mail for each customer found. Example, if the query finds 3+ row for customer ´John

How to insert data into table even if trigger fails?

Oracle 11.1 I have custom logging table where I insert data: I have a trigger that runs on a specific table which does some checkings. My problem is: when the trigger fails, I want to be able to log some data into the log_table. Trigger: The following code doesn’t work. I tried to use EXECUTE IMMEDIATE maybe to force it,

What’s wrong with this PL/SQL Trigger?

I have this table, and I want to create a trigger on Magazine, that verifies “after insert” if the name of the Magazine inserted is either Vogue or People. If it’s not one of them, it gets deleted. Table: MAGAZINE (ISBN, MAG_NOM, PRIX_Mois); My trigger: But the problem is my teacher told me: This is not suitable for every situation

Advertisement