Sponsored Content
Top Forums Shell Programming and Scripting Format options while Redirecting output of sql to a file in shell Post 302744581 by Yoda on Friday 14th of December 2012 12:31:37 PM
Old 12-14-2012
Then use col to format:-
Code:
col Column_1 format a8 
col Column_2 format a8 
col Column_3 format a8 
col Column_4 format a8 
col Column_5 format a8 
col Column_6 format a8

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

redirecting SQL output from within a shell script

Hi all I would like to open a SQL session from within a shell script and then redirect the output of the SQL command to a file. e.g. #!/bin/bash sqlplus "/ as sysdba" <<EOF @$HOME/recovery_space.sql EOF I want to redirect the output of the SQL command to a temp file, because... (2 Replies)
Discussion started by: soliberus
2 Replies

2. Shell Programming and Scripting

Redirecting sql select query result to txt file

Hi , I just found you while surfing for the string 'Redirecting sql select query output from within a shell script to txt file/excel file' Could you find time sending me the code for the above question? It'll be great help for me. I have a perl file that calls the sql file... (1 Reply)
Discussion started by: dolphin123
1 Replies

3. Shell Programming and Scripting

Redirecting sql select query result to txt file

Hi Yogesh, Lucky that i caught you online. Yeah i read about DBI and the WriteExcel module. But the server is not supporting these modules. It said..."Cannot locate DBI"..."Cannot locate Spreadsheet::WriteExcel" I tried creating a simple text file to get the query output, but the... (1 Reply)
Discussion started by: dolphin123
1 Replies

4. Shell Programming and Scripting

redirecting sql query output to a file

Hi, I am executing sql files in my unix shell script. Now i want to find whether its a success or a failure record and redirect the success or failure to the respective files. meaning. success records to success.log file failure record to failure.log file. As of now i am doing like... (1 Reply)
Discussion started by: sailaja_80
1 Replies

5. Shell Programming and Scripting

formatting into CSV format of SQL session output

I am getting a no of fields from a SQL session (e.g. select a,b,c from table). How do I convert the output values into CSV format . The output should be like this 'a','b','c', (4 Replies)
Discussion started by: mady135
4 Replies

6. Shell Programming and Scripting

Help me! Format output file using shell program

Hi, I have following input file. I want to generate output file in specific format using shell program. The input file has atleast few thousands of lines, the below are some sample lines. Input file: "ORDER NO"|"ORDER AMT"|"LINE ITEM"|"LINE AMT"|"SALES COMMISION %" ORD3456|5000|LIN345|30|25%... (8 Replies)
Discussion started by: dsubha
8 Replies

7. Shell Programming and Scripting

Redirecting command output to a file in a shell script

Hello All, I have some unique requirement. I have written a very lengthy script which calls number of resource script to execute a particular task. What I want is output of each command(called from main script and resource scripts) should go to a... (3 Replies)
Discussion started by: anand.shah
3 Replies

8. Shell Programming and Scripting

Script to generate Excel file or to SQL output data to Excel format/tabular format

Hi , i am generating some data by firing sql query with connecting to the database by my solaris box. The below one should be the header line of my excel ,here its coming in separate row. TO_CHAR(C. CURR_EMP_NO ---------- --------------- LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies

9. UNIX for Beginners Questions & Answers

Not able to write SQL query output in to .csv file with shell script.

I am trying to write SQL query output into a .csv file. But in the output columns are displaying in different lines instead of coming in one line. Main Code shell script: this is my code: #!/bin/bash file="db_detail.txt" . $file rm /batch/corpplan/bin/dan.csv... (6 Replies)
Discussion started by: sandeepgoli53
6 Replies

10. Programming

Python or Shell script to Grep strings from input file and output in csv format

Hi Experts, I am writing a python script to grep string from file and display output in csv file as in attached screenshot https://drive.google.com/file/d/1gfUUdfmQma33tz65NskThYDhkZUGQO0H/view Input file(result_EPFT_config_device) Below is the python script i have prepared as of... (1 Reply)
Discussion started by: as7951
1 Replies
QColorDrag(3qt) 														   QColorDrag(3qt)

NAME
QColorDrag - Drag and drop object for transferring colors SYNOPSIS
#include <qdragobject.h> Inherits QStoredDrag. Public Members QColorDrag ( const QColor & col, QWidget * dragsource = 0, const char * name = 0 ) QColorDrag ( QWidget * dragsource = 0, const char * name = 0 ) void setColor ( const QColor & col ) Static Public Members bool canDecode ( QMimeSource * e ) bool decode ( QMimeSource * e, QColor & col ) DESCRIPTION
The QColorDrag class provides a drag and drop object for transferring colors. This class provides a drag object which can be used to transfer data about colors for drag and drop and in the clipboard. For example, it is used in QColorDialog. The color is set in the constructor but can be changed with setColor(). For more information about drag and drop, see the QDragObject class and the drag and drop documentation. See also Drag And Drop Classes. MEMBER FUNCTION DOCUMENTATION
QColorDrag::QColorDrag ( const QColor & col, QWidget * dragsource = 0, const char * name = 0 ) Constructs a color drag object with the color col. Passes dragsource and name to the QStoredDrag constructor. QColorDrag::QColorDrag ( QWidget * dragsource = 0, const char * name = 0 ) Constructs a color drag object with a white color. Passes dragsource and name to the QStoredDrag constructor. bool QColorDrag::canDecode ( QMimeSource * e ) [static] Returns TRUE if the color drag object can decode the mime source e; otherwise returns FALSE. bool QColorDrag::decode ( QMimeSource * e, QColor & col ) [static] Decodes the mime source e and sets the decoded values to col. void QColorDrag::setColor ( const QColor & col ) Sets the color of the color drag to col. SEE ALSO
http://doc.trolltech.com/qcolordrag.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qcolordrag.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QColorDrag(3qt)
All times are GMT -4. The time now is 05:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy