Querying Oracle DB: Formatting and saving results from SQlPlus in TXT & CSV

SQL*Plus: Release 8.1.7.0.0 – Production on Thu Jan 24 14:25:37 2013 (c) Copyright 2000 Oracle Corporation. All rights reserved. Connected to: Oracle8i Enterprise Edition Release 8.1.6.1.0 – Production With the Partitioning option JServer Release 8.1.6.0.0 – Production SQL> SQL> SET UNDERLINE OFF SQL> SET COLSEP ‘,’ SQL> SET LINES 100 PAGES 100 SQL> SET FEEDBACK off SQL> SET LINESIZE 1000 SQL> SPOOL C:TestFolderMyUsers-DeletedData.txt SQL>Select * from EmpData where usergroup = 11771 SQL> SPOOL OFF   Open the C:TestFolderMyUsers-DeletedData.txt file  and verify that data is the one you are looking for Open an Excel Sheet and Import   Setting up SQLPlus […]

Read more