This file contains hidden or 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
select rownum | |
from dual | |
connect by level <= 1000; |
This file contains hidden or 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
DECLARE | |
n NUMBER; | |
BEGIN | |
FOR rec IN (SELECT owner, | |
table_name | |
FROM all_tables WHERE owner = 'OWNER') -- replace OWNER with target schema | |
LOOP | |
EXECUTE IMMEDIATE 'begin | |
select count(*) into :n from '|| | |
rec.owner||'.'||rec.table_name||'; |
This file contains hidden or 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
set heading off | |
set linesize 1000 | |
rem set pagesize 50000 | |
set echo off | |
set serveroutput on | |
SET FEEDBACK OFF | |
SPOOL out.sql | |
DECLARE | |
cur SYS_REFCURSOR; |
This file contains hidden or 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
^(?!.*(IF .* THEN|END IF;)).*$ |
This file contains hidden or 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
with a as | |
(select q'{ | |
Line 1 | |
Line 2 | |
Line 3 | |
Line 4 | |
This file contains hidden or 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
%s/\(.\+\)\t\(.\+\)\t\(.\+\)\t\(.\+\)/COMMENT ON COLUMN TABLE_NAME.\1 IS '\3 \4';/ |
This file contains hidden or 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
'[email protected], , , [email protected], , '.split(',').map{|i| i.strip()}.find_all{|i| not i.empty?}.join(", ") |
This file contains hidden or 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
', '.join(filter(lambda x: x != '', [x.strip() for x in '[email protected], , , [email protected], , '.split(',')])) |
This file contains hidden or 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
import sys | |
class ProgressBar(): | |
def __init__(self, num_steps): | |
self.num_steps = num_steps | |
def progress(self, step): | |
i = int(100.0 * step / self.num_steps) |
This file contains hidden or 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
declare | |
TYPE row_nt IS TABLE OF number; | |
a row_nt; | |
cursor a_cur is | |
select level from dual connect by level <= 100; | |
n number; | |
begin |
OlderNewer