New answers tagged

0

Assuming that you are using reasonably recent versions of SQL Server, MySQL, and PostreSQL, they should all support analytic functions (some will call them window functions) which are relatively recent additions to the SQL standard. If so, something like this should work SELECT * FROM ( SELECT customer_number, part_number, ...


1

I'm not sure if that is what you're trying to achieve, but to count working days you need a range of dates. IMHO the best way to deal with dates is by using a calendar table. Keep in mine that you need to add holidays and days off to your calendar. You can find a lot of samples googling a bit. If you don't have/want to use a calendar table, you can take ...


0

This is the trigger that I ultimately ended up using: create or replace trigger V202577_DELETE_custom before insert on D202577 for each row declare v_upd_row number; v_cre_date_row number; begin select count (1) into v_upd_row from A202577 where objectid = :new.sde_deletes_row_id ...


1

If I understood you correctly, then see if this helps: select created_date from that table check if it is lower than previous Sunday's 23:59 why? Because I presume that it can't be created in the future How to find that moment in time? One option is to use NEXT_DAY function which returns the "next" Sunday, but - if you subtract 7 (days) from it, ...


Top 50 recent answers are included