The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
In a csh script, can I set a variable to the result of an SQLPLUS select query? gregrobinsonhd Shell Programming and Scripting 7 04-14-2009 03:51 PM
Redirecting sql select query result to txt file dolphin123 Shell Programming and Scripting 1 06-25-2008 02:20 AM
Redirecting sql select query result to txt file dolphin123 Shell Programming and Scripting 1 06-23-2008 07:13 AM
pass result from one query to another u263066 Shell Programming and Scripting 1 08-15-2006 02:46 PM
passing result of query to a varibale in ksh script ammu Shell Programming and Scripting 2 07-27-2006 02:05 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-12-2009
little_wonder little_wonder is offline
Registered User
  
 

Join Date: May 2009
Posts: 26
Thumbs up How to Format the result driven from a SQL Query

Hi All,

I want to format the result driven from the query into neat format.
For example pls find the below code,

#! /bin/sh

result='

sqlplus -s uname/passwrd@DBname

select no,name,address,ph_no, passport_no,salary,designation
from emp_table where salary>1000;

exit

EOF'

echo $result

The code results a huge set that is not fit into the screen.
the number of rows returned from the query is also not static.

please help me to the result in formatted manner.

please advice me if any coloring or formatting text style command are availabe.

Thankyou all in advance.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:53 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0