The AskTOM team is taking a break over the holiday season, so we're not taking questions or responding to comments, but we might still sneak in a few Office Hours sessions! Thanks for being a member of the AskTOM community.
Thanks for the question, jayaraj.
Asked: April 05, 2017 - 6:37 am UTC
Last updated: April 07, 2017 - 2:29 am UTC
Version: oracle 11g
Viewed 10K+ times! This question is
Rajeshwaran, April 06, 2017 - 1:19 pm UTC
SQL> SQL> select * from scott.dept; DEPTNO DNAME LOC ---------- -------------- ------------- 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON SQL> set sqlformat loader SQL> SQL> select * from scott.dept; 10|"ACCOUNTING"|"NEW YORK"| 20|"RESEARCH"|"DALLAS"| 30|"SALES"|"CHICAGO"| 40|"OPERATIONS"|"BOSTON"| SQL> exit
C:\Users\admin>type d:\script.sql set sqlformat loader select * from scott.dept; exit C:\Users\admin>type d:\output.lst The system cannot find the file specified. C:\Users\admin>sql -S demo/demo@ora12c @d:\script.sql >> d:\output.lst C:\Users\admin>type d:\output.lst 10|"ACCOUNTING"|"NEW YORK"| 20|"RESEARCH"|"DALLAS"| 30|"SALES"|"CHICAGO"| 40|"OPERATIONS"|"BOSTON"| C:\Users\admin>
Rajeshwaran, April 20, 2017 - 2:14 am UTC
C:\Users\admin>sqlplus /nolog SQL*Plus: Release 12.2.0.1.0 Production on Thu Apr 20 07:40:17 2017 Copyright (c) 1982, 2016, Oracle. All rights reserved. idle> conn demo/demo@ora11g Connected. demo@ORA11G> demo@ORA11G> select * from scott.dept ; DEPTNO DNAME LOC ---------- -------------- ------------- 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON demo@ORA11G> set markup csv on delimiter | quote on demo@ORA11G> select * from scott.dept ; "DEPTNO"|"DNAME"|"LOC" 10|"ACCOUNTING"|"NEW YORK" 20|"RESEARCH"|"DALLAS" 30|"SALES"|"CHICAGO" 40|"OPERATIONS"|"BOSTON" demo@ORA11G>
Share and learn SQL and PL/SQL; free access to the latest version of Oracle Database!
Classes, workouts and quizzes on Oracle Database technologies. Expertise through exercise!