- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Retrieving the values from a Table ????
Operating System - HP-UX
1748044
Members
5009
Online
108757
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-06-2001 06:37 AM
тАО11-06-2001 06:37 AM
Re: Retrieving the values from a Table ????
Your answer lies in rewriting your script in perl:
http://www.orafaq.org/faqperl.htm
v_filedate=`echo " select bat_in_dir,bat_out_dir from product; " |
$ORACLE_HOME/bin/sqlplus -s USERNAME/PASSWORD|tail -2 | head -1`;
echo $v_filedate;
#!/pathtoperl/perl
use strict;
use DBI;
my $dbh = DBI->connect( 'dbi:Oracle:orcl',
'USERNAMEHERE',
'PASSWORDHERE',
{ RaiseError => 1, AutoCommit => 0 }
) || die "Database connection not made: $DBI::errstr";
my $sql = qq{ select bat_in_dir,bat_out_dir from product };
my $sth = $dbh->prepare($sql);
$sth->execute();
my($indir, $outdir); # Declare columns
$sth->bind_columns(\$indir, \$outdir);
print "List:\n\n"; # Fetch rows from DB
while( $sth->fetch() ) {
print "$indir, $outdir \n";
}
$sth->finish(); # Close cursor
$dbh->disconnect;
live free or die
harry
http://www.orafaq.org/faqperl.htm
v_filedate=`echo " select bat_in_dir,bat_out_dir from product; " |
$ORACLE_HOME/bin/sqlplus -s USERNAME/PASSWORD|tail -2 | head -1`;
echo $v_filedate;
#!/pathtoperl/perl
use strict;
use DBI;
my $dbh = DBI->connect( 'dbi:Oracle:orcl',
'USERNAMEHERE',
'PASSWORDHERE',
{ RaiseError => 1, AutoCommit => 0 }
) || die "Database connection not made: $DBI::errstr";
my $sql = qq{ select bat_in_dir,bat_out_dir from product };
my $sth = $dbh->prepare($sql);
$sth->execute();
my($indir, $outdir); # Declare columns
$sth->bind_columns(\$indir, \$outdir);
print "List:\n\n"; # Fetch rows from DB
while( $sth->fetch() ) {
print "$indir, $outdir \n";
}
$sth->finish(); # Close cursor
$dbh->disconnect;
live free or die
harry
Live Free or Die
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2001 06:46 AM
тАО11-07-2001 06:46 AM
Re: Retrieving the values from a Table ????
Hi
Try this
echo "
set heading off
set feedback off
set pagesize 0
select bat_in_dir from product
union all
select bat_out_dir from product;"|sqlplus -s USERNAME/PASSWORD|xargs rm -rf
Regards
Jonas
Try this
echo "
set heading off
set feedback off
set pagesize 0
select bat_in_dir from product
union all
select bat_out_dir from product;"|sqlplus -s USERNAME/PASSWORD|xargs rm -rf
Regards
Jonas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2001 07:33 PM
тАО11-07-2001 07:33 PM
Re: Retrieving the values from a Table ????
Hai all,
We cant remove the files directly...
I have attached one shell script which will read the parameters from the property file ...That script i recieved in the FAQ prepared by Robin...
so i have to follow in that way...Is it possible...
Regards
Raj
We cant remove the files directly...
I have attached one shell script which will read the parameters from the property file ...That script i recieved in the FAQ prepared by Robin...
so i have to follow in that way...Is it possible...
Regards
Raj
Oracle DBA
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP