11-20-2012
Multiple Query Results to Variables
Hello,
I am very new to shell scripting and I am not sure of how best to handle the following scenario. I need to query a list of values from a table. I need to store those results and use them to selectively delete values in yet another table in a separate database. I do know how to store the result of one value in a variable; however I am not sure if it is best to store multiple results in an array or to a variable and then parse the variable? Any guidance would be appreciative.
thanks
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi All,
I needed to get the result of two sqlplus queris into shell variables.
After days of looking for the ultimate solution to this problem.. i found this...
sqlplus -s USER/PASS@DB <<EOF | awk '{if(NR==1) printf("%s ", $1); if(NR==2) printf("%s ",
$1);}' | read VAR1 VAR2
set head off... (2 Replies)
Discussion started by: pranavagarwal
2 Replies
2. Shell Programming and Scripting
Hi
I would like to know if there is a way to just have one ORACLE connection established, using which we can execute different queries and store the results under different variables.
For e.g the following uses to two silent ORACLE connection to store the result under two different... (4 Replies)
Discussion started by: ashokjaysiv
4 Replies
3. Shell Programming and Scripting
I want to store the sql query output into a variable
#!/bin/ksh
ORACLE_SID=DB01;
export ORACLE_SID;
export FILE_PATH=/home/asg/Tmp
# Order Checking
echo " removing old files "
rm $FILE_PATH/Malformed_Order.txt
echo " Enter the Malformed Order ....!"
read orders
echo "Regrade... (5 Replies)
Discussion started by: Nareshp
5 Replies
4. UNIX for Dummies Questions & Answers
How can I send the results of a query to a unix variable. I basically want to run a query then do some logic on the results. Trying to redirect the result into a variable I define in the script.
select count(*) as counter from table - nut to redirect the "count" returned from the query... (2 Replies)
Discussion started by: rstone
2 Replies
5. Shell Programming and Scripting
While assisting a forum member, I recommended running SQL/Plus in a coprocess (to make database connections and run a test script) for the duration of his script rather than starting/stopping it once for every row in a file he was processing.
I recalled I made a coprocess example for folks at... (2 Replies)
Discussion started by: gary_w
2 Replies
6. Shell Programming and Scripting
Hi,
I have a script where I make a sqlplus connection. In the script I have multiple sql queries within that sqlplus connection. I want the result of the queries to be stored in shell variables declared earlier. I dont want to use procedures. Is there anyway else.
Thanks in advance..
Cheers (6 Replies)
Discussion started by: gonchusirsa
6 Replies
7. Shell Programming and Scripting
Hi,
I am new to linux...
How to Assign SQL Query Results to Variables in Linux,i want ti generate it in param files, Can anyone please explain me.
Ex: SQL> Select * from EMP;
O/P: Emp_No Emp_Name
1 AAA
2 BBB
3 CCC
and I want expected... (5 Replies)
Discussion started by: Sravana Kumar
5 Replies
8. Shell Programming and Scripting
Hi ,
I am purging two tables based on date.
In my script I am taking the count of the tables purging them and then taking the after counts. I need to mail the before and after counts of the two tables in a mail in table format as mentioned in the result section.
For Eg:
## Count of the... (14 Replies)
Discussion started by: CFA
14 Replies
9. Shell Programming and Scripting
Hi All,
I need to read values of 10 columns from oracle query and assign the same to 10 unix variables. The query will return only one record(row).
I tried to append all these columns using a delimiter(;) in the select query and assign the same to a single variable(V) in unix. I thought I... (3 Replies)
Discussion started by: hkrishnan91
3 Replies
10. Shell Programming and Scripting
Hello,
I'm trying to send email from Greenplum query results as HTML table with status Red/Green
Select Server, Last_Date from Table;
Results
Server, Last_Date
Prod, 2018-04-09
Final email Output in HTML format
Server Status LastDate
Prod GREEN(BOX) 2018-04-09 (if... (2 Replies)
Discussion started by: krux_rap
2 Replies
LEARN ABOUT DEBIAN
rdf::query::federate
RDF::Query::Federate(3pm) User Contributed Perl Documentation RDF::Query::Federate(3pm)
NAME
RDF::Query::Federate - A subclass of RDF::Query for efficient federated query execution.
VERSION
This document describes RDF::Query::Federate version 2.908.
SYNOPSIS
my $service = RDF::Query::ServiceDescription->new( $url );
my $query = new RDF::Query::Federate ( $sparql );
$query->add_service( $service );
my $stream = $query->execute();
DESCRIPTION
...
METHODS
"new ( $query, \%options )"
"new ( $query, $base_uri, $languri, $lang )"
Returns a new RDF::Query::Federate object for the specified $query. The query language defaults to SPARQLP, but may be set
specifically by specifying either $languri or $lang, whose acceptable values are:
$lang: 'rdql', 'sparql11', or 'sparql'
$languri: 'http://www.w3.org/TR/rdf-sparql-query/', or 'http://jena.hpl.hp.com/2003/07/query/RDQL'
"add_service ( $service_description )"
Adds the service described by $service_description to the query's list of data sources.
"services"
"algebra_fixup ( $algebra, $bridge, $base_uri, $ns )"
Called in the fixup method of ::Algebra classes, returns either an optimized ::Algebra object ready for execution, or undef (in which
case it will be prepared for execution by the ::Algebra::* class itself.
AUTHOR
Gregory Todd Williams <gwilliams@cpan.org>
perl v5.14.2 2012-01-31 RDF::Query::Federate(3pm)