formatting the sql select result


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting formatting the sql select result
# 1  
Old 08-28-2007
formatting the sql select result

Hi,
I have about 12 columns and 15 rows to be retrived from sybase isql command through unix. But when i output the sql into a file and see it, the formatting is going for a toss. can someone please suggest how can i get the result correctly in the output file ?

Thanks,
Sateesh
# 2  
Old 08-28-2007
Please post the output you are getting
# 3  
Old 08-28-2007
here is the result.

CheckId Description Frequency AU SG AP BEI BKK HK KUL JKT MnB SeB TpB
----------- -------------------------------------------------- -------------------- -------------------- -------------------- -------------------- -------------------- -------------------- -------------------- -------------------- -------------------- -------------------- -------------------- --------------------
1 Check whether the batch has finished or not Daily 9:30 AM (AUST) OK OK OK NA NA NA NA NA NA NA NA
2 Check the status of the jobs completed and estimat Daily 9:30 AM (AUST) NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
3 Check in the report folder of each location to see Daily 9:30 AM (AUST) OK OK NA OK OK OK OK Not Completed Yet Holiday OK OK
4 Check whether the reports job has completed and re Daily 9:30 AM (AUST) NA Errors Found OK NA NA NA NA NA NA NA NA
5 Check the Marks feed - whether there are obvious e Daily 9:30 AM (AUST) NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
6 Check the cat* files for SG and AP Daily 9:30 AM (AUST) NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
7 Check the batchDates table to ensure correct dates Daily 9:30 AM (AUST) OK OK NA OK OK OK OK OK OK OK OK
8 Check for PNL detail table Daily 9:30 AM (AUST) OK OK NA OK OK OK OK OK Holiday OK OK
9 Batch click off time Daily 9:30 AM (AUST) 17:38 20:28 20:36 NA NA NA NA NA NA NA NA
10 Marks to RiskMaster Timing Daily 9:30 AM (AUST) NULL NULL NA 21:55 21:05 22:13 22:15 20:45 23:22 22:35
11 Check Transactor feed Timing Daily 9:30 AM (AUST) OK OK OK NA NA NA NA NA NA NA NA
12 Batch completion time Daily 9:30 AM (AUST) 02:37 06:06 06:06 NA NA NA NA NA NA NA NA
13 Report sftp to ROD Daily 9:30 AM (AUST) NULL NULL NA 06:43 05:52 06:44 06:44 05:52 06:45 07:37 06:46
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Sql select replace

Hi All, I had a query related to sql select replace command. i have a table named clusters and it looks like this Code: name characteristics sample 1.1 parent sample 1.2 ... (2 Replies)
Discussion started by: siya@
2 Replies

2. Shell Programming and Scripting

sql select command output formatting in shell script

Hi, I need to connect to the database and retrieve two variables from the database and store them in a variable,out of these two variables I need to get lastdigit appended to the variable 1 retrieved and variable 2 with out any modification in short select var,data from usage; o/p=... (1 Reply)
Discussion started by: rkrish
1 Replies

3. UNIX Desktop Questions & Answers

Grep result loses formatting

I am searching for a string in a file and then redirecting the contents in another file... however the formatting is not preserved.. Can you please help me on this ... (5 Replies)
Discussion started by: blackeyed
5 Replies

4. Shell Programming and Scripting

SQL select all but not if it is already in an other column

I know I know.. for sure one of the easier mysql statements. But somehow I can not figure out this. I expect to see all distinct items of 'data_12' where 'kwroot' has 'straxx' in, and in the same row 'data_12' ist (not = 'kwsearched' in any existing row) data_12 ... (6 Replies)
Discussion started by: lowmaster
6 Replies

5. Shell Programming and Scripting

In a csh script, can I set a variable to the result of an SQLPLUS select query?

Can someone tell me why I'm getting error when I try to run this? #!/bin/csh -f source ~/.cshrc # set SQLPLUS = ${ORACLE_HOME}/bin/sqlplus # set count=`$SQLPLUS -s ${DB_LOGIN} << END select count(1) from put_groups where group_name='PC' and description='EOD_EVENT' and serial_number=1;... (7 Replies)
Discussion started by: gregrobinsonhd
7 Replies

6. Shell Programming and Scripting

SQL Select and awk

Dear All , I have file1.txt contain values like the following: ---------- 23 24 25 and I have shell script which has the following : more file1.txt | awk '{print "select 'DUMP',CODE1||'|'||CODE2||'|'||CODE3 from CODE where CODE1='" $1 "';"}' > file2.sql all I need is to have the... (6 Replies)
Discussion started by: habuzahra
6 Replies

7. UNIX for Dummies Questions & Answers

Select only certain lines from file and mantain formatting

I want to take the below data, and have it output to file only the STMC#/(IP address) and the "there are X number of updates to install" lines for each machine. I know it's easy, but Im a beginner in BASH stuff, my solution would probably take way too many lines to do something easy.Thanks! ... (5 Replies)
Discussion started by: glev2005
5 Replies

8. 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

9. 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

10. Shell Programming and Scripting

how to convert the result of the select query to comma seperated data - urgent pls

how to convert the result of the select query to comma seperated data and put in a .csv file using korn shell. Pls help me as its very urgent. Thanks, Hema. (1 Reply)
Discussion started by: Hemamalini
1 Replies
Login or Register to Ask a Question