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
select 'Hello World' from dual |
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
select 'Hello World' from dual; |
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
select column_name, column_id | |
from user_tab_cols | |
where table_name = '&tableName' | |
order by 2 |
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
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? |
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
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 |
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
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 |
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
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... |
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
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 |
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
validates :cost, :numericality=> {:greather_than => 0} |
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
# This configuration file contains the absolute path locations of all | |
# installed Rubies to be enhanced to work with the DevKit. This config | |
# file is generated by the 'ruby dk.rb init' step and may be modified | |
# before running the 'ruby dk.rb install' step. To include any installed | |
# Rubies that were not automagically discovered, simply add a line below | |
# the triple hyphens with the absolute path to the Ruby root directory. | |
# | |
# Example: | |
# | |
# --- |
OlderNewer