Help Needed: UNIX shell variables to store Oracle table records
Hello Folks,
I'm working on a requirement to automate the process of generating report(csv file) using metadata info stored in an Oracle table and E-mail it to respective people.
Meta data table:
To implement this I'm planning to store the metadata entries into Unix shell variables and create a loop and process each record(report_SUB_ID,DB, SQL etc) in the loop indivudally.
Then,planning to execute each SQL in the respective DB and spool the output of the SQL query to a csv file on the unix server and then attach it and send it to the respective user.
Can you please advise if my approach is right ? If not , please advise whats the best possible way to achieve this?
If yes , please suggest what type of shell variables I have to create and how can I looop through these values.
Thanks in Advance
Regards,
Venkat
Last edited by Don Cragun; 10-29-2015 at 04:27 PM..
Reason: Add CODE tags.
Hi Friends,
I looking for the script for the count of the records in table.
and then it's containg the zero records then should get abort.
and should notify us through mail.
Can you please help me out in this area i am lacking. (5 Replies)
how to store the count of queries in variables inside a filein shell script
my output :
filename
-------
variable1=result from 1st query
variable2=result from 2nd query
.
.
.
. (3 Replies)
I have a input file like this.
Sample.txt
30 | TXDatacenter | TXBackupDC
10 | UKDatacenter | UKBackupDC
0 | NLDatacenter | NLBackupDC
......
......
......
I need to get these values in different variables like this.
Load1=30
PriCenter1=TXDatacenter... (5 Replies)
Hello,
I am new to UNIX.
My Requirement: Need to connect to Oracle database from UNIX and execute an SELECT statement and store the records in a flatfile of Comma delimiter.
What I have Succeeded: I was able to connect to Oracle from UNIX.
Problem: I cannot fetch multiple... (3 Replies)
Hi everyone, I am having some problems with my scripts so I hope you could help me.
I am trying to store the result of a division in a variable in tcshell but I have the problem that if:
For example, dividing 2/100 the result is 0.02 but if I store that I have "0".
How can I have 0.02... (8 Replies)
I want to store contents of command
dir in array of variables
For eg: dir contents are
command d2 demovi~ file inven java new untitled folder
d1 demovi er1 filename inven~ myfiles ubuntu desktop xmms
-----------------------------------
I... (3 Replies)
Hi,
I have delimited file(|).
Sample data:
1|name|50009|DS24|0|12
2|name|30009|DS24|0|13
3|name|20409|DS24|0|14
4|name|20009|DS24|0|15
5|name|10009|DS24|0|16
I want to load this data into a oracle table (update and insert)
Please help me the commands and also... (1 Reply)
HI,
I'm trying to get this right, please can you help. In my unix korn shell script, I call an oracle stored proc within a package and I specify 3 parameters, 2 of which are IN OUT parameters (i.e. I expect the stored proc to change them and return them back to me).
Does the unix code... (7 Replies)
Hi friends,
I have to do the following things :
1) there should be a shell script returning the returning the return code of the script. and i have to add some more details like on which machine is has run , at what time and other details and then using plsql i have to add a row to Oracle... (3 Replies)