10 More Discussions You Might Find Interesting
1. 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
2. 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
3. Shell Programming and Scripting
Hi Guys,
I need to compare the sql output with a column present in a file.
I am able to read the column from the file and stored in a variable.
Can somebody help how to store output of the below query to a variable. The database is Oracle.
Select count(*) from tableName;
... (2 Replies)
Discussion started by: mac4rfree
2 Replies
4. Shell Programming and Scripting
Hi friends,
I would like to get some help on the following requirement. I have a SQL file with following things,
select 1 from dual;
select user from dual;
select sysdate
from
dual;
BEGIN
PL/SQL Code
END;
/
This file will be saved as sql file. When I run my expected shell script,... (1 Reply)
Discussion started by: ssnair
1 Replies
5. Shell Programming and Scripting
Can i do this
Say one command
sed 's/:*/ /g' $summf
is returning
C1234
C2345
C3434
some no of rows, now this ouput i have to insert it into a DB table
how do i do this?? (2 Replies)
Discussion started by: depakjan
2 Replies
6. Shell Programming and Scripting
Hi,
How to execute sql statements from the .sh file ??
Means, when we run .sh file then the sql statements within it should be get executed one by one from the sqlplus
With Regards (3 Replies)
Discussion started by: milink
3 Replies
7. 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
8. Shell Programming and Scripting
:confused: I have a ksh script which gathers data from a file. I need to find a way to direct the output to a new file. The code looks something like this:
DUP_FILE=`touch /export/.../.../dup_social_$1`
while (($# > 0 ))
do
# Make sure the file exists
if ]
then
print "$1: does not... (4 Replies)
Discussion started by: Muga801
4 Replies
9. Shell Programming and Scripting
Hi all,
I currently have the following script in 1) which outputs to a file if the 3rd column is equal to the message_id value. This works. However what I want to do is incorporate an else statement and output to a different file if the 3rd column doesnt equal the message_id values. I tried that... (7 Replies)
Discussion started by: Donkey25
7 Replies
10. Shell Programming and Scripting
Hi, I am trying to create sql statements from a file, but I have a problem with ':
This is what I do:
cat filex.txt | awk -F: '{print $1,"A","and personnavn like",$5}' | sed -e "s/^/select bruker.brukernavn, person.personnavn from bruker, person where brukernavn like '/" -e "s/$/' and... (2 Replies)
Discussion started by: hannem
2 Replies