Last active
August 29, 2015 14:02
-
-
Save pankajparashar-zz/f9f1c21b126b3935279e to your computer and use it in GitHub Desktop.
The perfect SQLPLUS script.
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
SET TRIMSPOOL ON | |
SET TRIMOUT ON | |
SET HEADSEP OFF | |
SET ECHO OFF | |
SET VERIFY OFF | |
SET TERMOUT ON | |
SET HEADING OFF | |
SET PAGESIZE 0 | |
SET FEEDBACK OFF | |
SET NEWPAGE NONE | |
SET LINESIZE 9999 | |
SET FEEDBACK OFF | |
SET SQLPROMPT '' | |
SET PAUSE OFF | |
SET TERM OFF | |
--FILENAME | |
SPOOL OUTPUT.CSV | |
--HEADERS | |
SELECT CONCAT('"','COLA')||'","'||'COLB'||'","'||CONCAT('COLC','"') FROM DUAL; | |
--DATA | |
SELECT CONCAT('"',COLA)||'","'||COLB||'","'||CONCAT(COLC,'"') FROM TABLE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment