This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Pure SQL way to get dynamic date range instead of pipelined function | |
-- as shown here: https://twitter.com/cczarski/status/1500830480358330370 | |
with | |
data as ( | |
select | |
level insert_order, | |
decode(level, | |
1, 'Since Yesterday', | |
2, 'Last Week', | |
3, 'Last Month', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Feedback based on https://www.insum.ca/feuertip-7-how-not-to-handle-dml-errors/ | |
create or replace procedure full_of_dml ( | |
p_order in number, | |
p_lines in lines_t | |
) | |
is | |
l_scope logger_logs.scope%type := 'full_of_dml'; | |
l_params logger.tab_param; | |
begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Test | |
-- Another test | |
alias testmartin=select 1 | |
from dual | |
/ | |
alias fk=select f.constraint_name, f.r_owner || '.' || f.r_constraint_name reference_constraint | |
, t.table_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- prompt hello from github | |
select sysdate | |
from dual | |
; |