Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for scripts/perl/oracle/oracledump.pl between version 1.34 and 1.35

version 1.34, 2008/08/23 19:21:26 version 1.35, 2008/08/23 20:40:12
Line 1 
Line 1 
 #!/usr/bin/perl  #!/usr/bin/perl
   
 # $Platon: scripts/perl/oracle/oracledump.pl,v 1.33 2008-08-23 18:54:00 nepto Exp $  # $Platon: scripts/perl/oracle/oracledump.pl,v 1.34 2008-08-23 19:21:26 nepto Exp $
   
 use strict;  use strict;
   
Line 391  foreach $table (@opt_tables)
Line 391  foreach $table (@opt_tables)
     my @column_types;      my @column_types;
     my @row;      my @row;
         my $table_out;          my $table_out;
           my $table_for_select;
           my $record_count;
   
   
           $table_for_select = $table;
           if (defined $opt_owner) {
                   $table_for_select = "$opt_owner.$table";
           }
   
           ## Check number of record
   
           $query = 'SELECT COUNT(*) FROM '.$table_for_select;
       $sth = $dbh->prepare($query);
       $sth->execute() || die $DBI::errstr;
       while (@row = $sth->fetchrow_array()) {
                   $record_count = $row[0];
           }
   
         $table_out = $table;          $table_out = $table;
         $table     = uc $table;          $table     = uc $table;
Line 552  MARK
Line 569  MARK
   
 $CM  $CM
 $CM Dumping data for table: $table_out  $CM Dumping data for table: $table_out
   $CM Records: $record_count
 @{[ (scalar @opt_where > 0)  @{[ (scalar @opt_where > 0)
     ? "$CM WHERE:  " . join(' AND ', @opt_where) . "\n$CM\n"      ? "$CM WHERE:  " . join(' AND ', @opt_where) . "\n$CM\n"
     : "$CM\n" ]}      : "$CM\n" ]}
Line 571  MARK
Line 589  MARK
         ## Query for data then output SQL          ## Query for data then output SQL
   
         $query = sprintf( 'SELECT "%s" FROM %s',          $query = sprintf( 'SELECT "%s" FROM %s',
                 join ( '","', @column_names ), defined $opt_owner ? "$opt_owner.$table" : $table );                  join ( '","', @column_names ), $table_for_select);
     $query .= ' WHERE ' . join ( ' AND ', @opt_where ) if ( scalar @opt_where > 0 );      $query .= ' WHERE ' . join ( ' AND ', @opt_where ) if ( scalar @opt_where > 0 );
   
         $sth = $dbh->prepare($query);          $sth = $dbh->prepare($query);

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top