11-03-2011
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I search all post...and no soluation about..if i would like to run a sql statement and output the result to txt file.
for example,
i usually run "sql" to logon the database and run select statement. Then I need to copy the output into the result.txt. Can I run the script to do this... (7 Replies)
Discussion started by: happyv
7 Replies
2. HP-UX
Hi all,
I need to bring the message to log file.Teradat/Hp-Ux
script:
-----
### Update Log Table
bteq <<- EOC
.run file ${SRC_DATA}/logon.txt
.run file ${SRC_DATA}/dbstagebteq.txt
.set format off
.set foldline off all
.set sidetitles off
... (1 Reply)
Discussion started by: vsubbu1000
1 Replies
3. Shell Programming and Scripting
Hi All,
Please help me writing the below script.
I have two sql queries.
1. Select count(1),Client_id from TABLE_A group by Client_id;
2. Select count(1),Client_id from TABLE_B group by Client_id;
I need the output of above two sql queries in a single file. The output 2nd query should be... (4 Replies)
Discussion started by: 46019
4 Replies
4. Shell Programming and Scripting
output of Unix & sql in same file
hi all,
am working on shell script, i need to format data in such a way
that both my Unix commands output & my sql output should be in a same file.
I am able to redirect both output in separate files.
for sql output: sqlplus -s... (6 Replies)
Discussion started by: bankimmehta
6 Replies
5. Shell Programming and Scripting
I need to call and execute an SQL script within a KSH script and get the output/extracted data into a CSV file. Is there any way to get the out put in a CSV file other than spooling ?
I tried spooling. Problem is if there is any wrning/comment/Error they all will be spooled into the csv file. I... (4 Replies)
Discussion started by: Sriranga
4 Replies
6. UNIX for Advanced & Expert Users
Hello Guys,
This message is somewhat relates with last thread. But I need to re-write thing. I start over a little. I am stuck now and need your help.
Here is my script-
#! /bin/ksh
export ORACLE_HOME=/opt/oracle/app/oracle/product/9.2
/opt/oracle/app/oracle/product/9.2/bin/sqlplus -s... (5 Replies)
Discussion started by: thepurple
5 Replies
7. Shell Programming and Scripting
Shell : Korn
os : AIX
This is the ps output looking for a process called pmon. pmon runs with various 'service' names which is appended with an underscore as shown below.
For example a pmon process for the service hexjkm will be named ora_pmon_hexjkm
$ ps -ef | grep pmon
oracle... (1 Reply)
Discussion started by: kraljic
1 Replies
8. Shell Programming and Scripting
I have 2 files of almost same text apart from 2,3 ending lines. Now I want to get that difference in another file.
e.g file1.txt is
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_livecd-lv_root
18G 2.4G 15G 14% /
tmpfs 504M ... (12 Replies)
Discussion started by: kashif.live
12 Replies
9. Shell Programming and Scripting
Hi All,
I have around 900 Select Sql's which I would like to run in an awk script and print the output of those sql's in an txt file.
Can you anyone pls let me know how do I do it and execute the awk script? Thanks. (4 Replies)
Discussion started by: adept
4 Replies
10. Shell Programming and Scripting
Hi All,
I want to run multiple sql queries and store the data in variable but i want to use sql command only once. Is there a way without running sql command twice and storing.Please advise.
Eg :
Select 'Query 1 output' from dual;
Select 'Query 2 output' from dual;
I want to... (3 Replies)
Discussion started by: Rokkesh
3 Replies