Skip to content
Advertisement

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 them, i.e. The end result for this exercise is to return distinct

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 something like this: Your code doesn’t work because you

Calculate Week Numbers based on the initial given date to end date

I have below scenario that Business want to calculate Week Number based on Given Start Date to End Date. For Ex: Start Date = 8/24/2020 End Date = 12/31/2020 ( These Start date & end date are not constant they may change from year to year ) Expected Output below: I need Oracle Query to calculate Week Number(s) like above

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 row with a

Advertisement