Skip to content

Instantly share code, notes, and snippets.

@finsterthecat
Created January 25, 2011 23:22
Show Gist options
  • Save finsterthecat/795916 to your computer and use it in GitHub Desktop.
Save finsterthecat/795916 to your computer and use it in GitHub Desktop.
Shows formatting, column width settings to print out a simple report based on an oracle view
SET LINESIZE 200
SET PAGESIZE 60
COLUMN FIRST_NAME HEADING 'FIRST NAME' FORMAT A15 WRAP
COLUMN LAST_NAME HEADING 'LAST NAME' FORMAT A20 WRAP
COLUMN BUSINESS FORMAT A20 WRAP
COLUMN PHONE FORMAT A15 WRAP
COLUMN EMAIL FORMAT A30 WRAP
COLUMN CREATED FORMAT A16
COLUMN MODIFIED FORMAT A16
ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI';
select USER_FIRST_NAME AS FIRST_NAME, USER_LAST_NAME AS LAST_NAME, BUSINESS_NAME AS BUSINESS, PHONE_NUMBER AS PHONE, EMAIL, CREATE_TS AS CREATED, MODIFY_TS AS MODIFIED
from
rptv_business_profile
where email_opt_in_flag = 'Y'
ORDER BY BUSINESS, LAST_NAME, FIRST_NAME;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment