Skip to content

Tag: plsql

Compare dates between two dates at specific positions

Given the following sample records within the table: MY_DATES, using Oracle SQL and/or PL/SQL, I need to always take the first DATE_REGISTERED in this table, i.e. 26/10/2019 and then advance to the third DATE_REGISTERED record/value, i.e. 2/02/2020 and check if the difference is greater than 13 weeks, between…

Case statement based on the time

I have the following table Based on the transaction_DT: if the transaction between 04:00:00 PM to 08:00:00 AM + next day get “After Hour” Between 08:00:00 AM to 04:00:00 PM within same day get “Working Hour” Using the case statement it is not works! Answer Hmmm . . . how about somethin…

limit column char trigger plsql

I’m starting to learn PLSQL and created a very very simple table, I’m trying to get familiar with functions and triggers. My table: Now to the question, I want to limit before insert or update new row (biuefer) so that the first name must be 8 characters, not less, not more. If you try to insert a…