Removing unnecessary eol ($) character from Oracle sql query output


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Removing unnecessary eol ($) character from Oracle sql query output
# 8  
Old 11-06-2012
In your example, what about the pipe | character between cc and dd? It was there when you showed the db record.

Code:
aa|bb|cc$
dd|ee|ff|gg$
hh|ii|jj|kk$
$

# 9  
Old 11-07-2012
I have used column separator as '|' in oracle query and then I have removed that with replacing it by tab but $ remains there .

so output after replacing "|" is
aa bb cc$
dd ee ff gg$
hh ii jj kk$
$

I have corrected my earlier post.

---------- Post updated 11-07-12 at 12:45 PM ---------- Previous update was 11-06-12 at 03:14 PM ----------

@ ANSHUMAN : It is working

Last edited by Harshal22; 11-06-2012 at 04:20 PM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sql query output count

Hi Team, below sql rerturn 20 records, the result set i am going to assign to one variable and it showing count is 1. and i don't use count() in sql query... based on count, i need to fail the script. No_of_step=`echo ${g_count} | wc -l` function gf_count() { g_count=`sqlplus -s... (8 Replies)
Discussion started by: bmk123
8 Replies

2. Programming

Oracle simple SQL query result in: ORA-08103: object no longer exists

Dear community, please help with a query on Oracle. I'm using SQLPlus (but with SQLDeveloper is the same) to accamplish a sinple query like: select count(*) from ARCHIT_D_TB where (TYP_ID=22 OR TYP_ID=23) and SUB_TM like '%SEP%' and CONS=1234This is a very simple query that works perfect until... (5 Replies)
Discussion started by: Lord Spectre
5 Replies

3. Solaris

SQL QUERY to Table Output

Hi I am trying to run sql query from solaris in csh script and send the output to email. Below is my sql query select p.spid,se.program seprogram, se.machine, se.username, sq.sql_text,sq.retrows from v$process p inner join v$session se on p.addr = se.paddr inner join ( select... (2 Replies)
Discussion started by: tharmendran
2 Replies

4. Shell Programming and Scripting

How to run a SQL select query in Oracle database through shell script?

I need to run a SQL select query in Oracle database and have to capture the list of retrieved records in shell script. Also i would like to modify the query for certain condition and need to fetch it again. How can i do this? Is there a way to have a persistent connection to oracle database... (9 Replies)
Discussion started by: vel4ever
9 Replies

5. Shell Programming and Scripting

perl- oracle sql query

Hi, I am new to perl.How to query oracle database with perl??? Thanks (1 Reply)
Discussion started by: tdev457
1 Replies

6. Shell Programming and Scripting

Read value from user and use it in Oracle SQL query

Guys can anyone just tell me whether i can pass a value(from UNIX SCRIPT) as an ARGUMENT in Oracle Query? e.g. echo "enter value" read value insert into tablename where col=$value /*something like this*/ (1 Reply)
Discussion started by: subodh.thakar
1 Replies

7. Shell Programming and Scripting

Removing unnecessary Delimiters from a file

Hi all, I have a pipe delimited file - (sample data) 1|1|K|Doe|1234567890|123456789|EXP|99|99|John|Y|Dallas|Texas|Kyle|999 2|1|A|2|01/01/9999|Appl|01/01/9999|vendor|Select|||||| 3|1|A|2|01/01/9999|Check|01/01/9999|ksmith|Suggest|||||| 4|1|T|Complaint|Mary|01/01/9999|01/01/9999|||||||... (2 Replies)
Discussion started by: sumeet
2 Replies

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

9. Shell Programming and Scripting

Oracle SQL Query & connect?

Hi I'm looking to query a table on a database and then iterate over the results in a loop. I believe this is the last part of my script that I need (after finding out threads for passing variables to other scripts and calling functions in other scripts). I've searched the forums but the best... (8 Replies)
Discussion started by: Dird
8 Replies

10. Shell Programming and Scripting

How to store the sql query's output in a variable

Hi, My requirement is : We are calling an sql statement from a UNIX session, and fetching data into some variables from a table .. now we are unable to access these variables from outside the SQL part. Please let me know how can I achieve this. Can you please share a code snippet which... (4 Replies)
Discussion started by: venkatesh_sasi
4 Replies
Login or Register to Ask a Question