View gist:649590
select 'Hello World' from dual |
View gist:649621
select 'Hello World' from dual; |
View gist:649722
select column_name, column_id | |
from user_tab_cols | |
where table_name = '&tableName' | |
order by 2 |
View gist:649730
create or replace function getDelimRow(i_table_name varchar2, i_delim varchar2, i_rowNumber number) return varchar2 is | |
Result varchar2(2000); --delimited string that will be returned | |
execSql varchar2(2000); --sql to execute to get delimited string | |
l_colName varchar2(2000); --column name from user_tab_cols for the table passed in | |
concatCols varchar2(2000); --all cols concated together to be part of the execsql var. | |
cursor l_cur is | |
select column_name | |
from user_tab_cols | |
where table_name = upper(i_table_name) | |
order by column_name; --i know, cursors are bad. Got a suggestion? |
View gist:649803
#!/usr/bin/perl | |
use strict; | |
use LWP::Simple; | |
my $url = 'http://site/files'; | |
my $file = 'fileName'; | |
getstore( "$url/$file", $file ); |
View gist:664350
create or replace trigger master_table_audit | |
after insert or update or delete on master_table | |
for each row | |
-- | |
begin | |
if UPDATING then | |
insert into audit_table ( | |
pk_uid | |
,edit_user | |
,edit_datetime |
View easyAuditTrails.sql
create or replace trigger master_table_audit | |
after insert or update or delete on master_table | |
for each row | |
-- | |
begin | |
if UPDATING then | |
insert into audit_table ( | |
pk_uid | |
,edit_user | |
,edit_datetime |
View gist:668076
gem install ruby-oci8 | |
1 gem installed | |
Installing ri documentation for ruby-oci8-2.0.4-x86-mingw32... | |
Installing RDoc documentation for ruby-oci8-2.0.4-x86-mingw32... |
View gist:668381
class Product | |
attr_accessor :external_id #automagically create reader & writer methods | |
attr_reader :internal_id #automagically create reader method | |
attr_writer :product_id #automagically create writer method | |
end |
View Numericality?
validates :cost, :numericality=> {:greather_than => 0} |
OlderNewer