![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Output format - comparison with I/p file | velappangs | Shell Programming and Scripting | 1 | 04-03-2008 06:31 AM |
| Getting output parameter in sqlplus | risshanth | UNIX for Dummies Questions & Answers | 1 | 04-01-2008 01:32 PM |
| sqlPlus output with new line character | decci_7 | UNIX for Advanced & Expert Users | 2 | 03-08-2008 04:54 PM |
| format output | Tornado | Shell Programming and Scripting | 7 | 11-19-2006 06:17 AM |
| Format the output of file | getdpg | Shell Programming and Scripting | 9 | 01-24-2006 12:50 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi,
I am using a query like below in my shell script : { { echo "set echo off" echo "set head off" echo "whenever sqlerror exit -1; select NUMBER ||','|| FNAME ||','|| LOC ||','|| NUM ||','|| DESC ||','|| ID ||','|| INC ||','|| to_char(start_date,'dd-mm-yyyy') ||','|| to_char(end_date,'dd-mm-yyyy') from emp_details where ..... } | sqlplus -s testuser/testpass@testdb > EmpDetails.txt } As I need a comma separated file. When the file is created, a sample lines looks like below: 2514,MY_TEST_NAME_IS,351,23728929,THIS_IS_A_TEST VALUEQ,47265,Y,01-04-2008,01-01 -2027 As you can see there is an extra carriage return coming after "01-01" and the "-2027" is going to the next line. This is happening with all the outout lines. Any data after a particular length is going to the next line. How can I remove this formatting issue? Thanks Deepak |
|
||||
|
Set Lines
Hi Deepak
The parameter you are looking for is the SET LINESIZE. It sets the number of characters as page width of the query results. In you example, put this line after 'echo "set head off"': echo "SET LINESIZE 300" Regards, Er |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|