![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| To convert multi format file to a readable ascii format | gaur.deepti | UNIX for Dummies Questions & Answers | 5 | 03-25-2008 12:03 PM |
| Convert UTF8 Format file to ANSI format | rajreddy | UNIX for Dummies Questions & Answers | 9 | 05-25-2007 05:26 AM |
| Convert UTF8 Format file to ANSI format | rajreddy | UNIX for Advanced & Expert Users | 1 | 05-24-2007 03:40 AM |
| convert mmddyy date format to ccyyddd format?? | Bhups | Shell Programming and Scripting | 2 | 09-27-2006 08:30 PM |
| change the empty function from the old format to the new format | powah | Shell Programming and Scripting | 0 | 06-23-2005 09:17 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi, All:
I got a output from run a script as follows: ____________________________________________________ SQL*Plus: Release 8.0.5.0.0 - Production on Thu Jul 18 11:25:1 2002 (c) Copyright 1998 Oracle Corporation. All rights reserved. Connected to: Oracle8 Enterprise Edition Release 8.0.5.1.0 - Production PL/SQL Release 8.0.5.1.0 - Production SQL> SQL> SQL> PRIM_T PRIM_T_OFFSET PRIM_T_SIZE PRIM_T_MARKER ------ ------------- ----------- ------------- AA0318 149363 14821 2337 * SQL> Disconnected from Oracle8 Enterprise Edition Release 8.0.5.1.0 - Production PL/SQL Release 8.0.5.1.0 - Production BLOCK_01022001 * ____________________________________________________ This is only part of the output, a lot same thing I didn't list here. What I really want to do is to have that two line with * formated like below: BLOCK_01022001: AA0318 149363 14821 2337 Could anyone give me a help? Thanks in advance! yun |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Since this output is from a script you should ask in the Shell Programming and Scripting Q & A forum.
__________________
regards, sTorm |
|
#3
|
|||
|
|||
|
This is not really a matter of unix, but one ofsql .
you should make your sql script look like the following :
This way you'll get an outputfile which contains only the line(s) you need and it's much eassier to work with this data then. From where does this "BLOCK_01022001" thing come ? Is it a fixed value ? |
|
#4
|
||||
|
||||
|
Oops, sorry for the wrong information.
__________________
regards, sTorm |
|
#5
|
|||
|
|||
|
If you need to combine output results from two absolutly different scrips (if you can't combine it in the one), then I think you have to do something like this:
----- scra: sqlplus -s /nolog <<EOF connect ... @you_script_1_or_just queries EOF ----- scrb: sqlplus -s /nolog <<EOF connect ... @you_script_2_or_just queries EOF --- to identify you string for output in both queries use any unique values in select, like "select 'UNIQ1', * ....." main: result=`scra | grep UNIQ1``scrb | grep UNIQ2` echo $result ------------------- I think, that other way to solve the problem - only combine all results in one sql-script. And I think it really possible, all depends of your tasks. |
|
#6
|
|||
|
|||
|
P.S. To combine all tasks in one query you can use PL/SQL procedure, which will generate table with report, and you just will print report in you script
|
|
#7
|
|||
|
|||
|
Plelie and Colf:
Thank you so much! What you recommend methods is great, I'll give a try. "BLOCK_01022001" is a fixed table name. yun |
|||
| Google The UNIX and Linux Forums |