Help for this page

Select Code to Download


  1. or download this
        # Create new Xbase object using the file name passed in
        my $table = new XBase "$dbfFileName" or die XBase->errstr;
        
        # Get field names in the table
        my @fieldNames = $table->field_names;
    
  2. or download this
        # Create a select statement to get this data from the table
        my $selectStatement = "SELECT ";
    ...
    
        my $sth = $dbh->prepare(" $selectStatement ") or die $DBI::errstr;
        $sth->execute() or die $sth->errstr(0);
    
  3. or download this
        # Walk through results set one row at a time
        while ( my (@row) = $sth->fetchrow_array())
    ...
            my $COMMENTS = $row[27];
            my $POSITION_ = $row[28];
            my $TEST_ID = $row[29];
    
  4. or download this
         my $localValues = "my \$";
        $localValues .= join(', $',@fieldNames) ; # 
        print "$localValues\n" if $debugFlag;
    
  5. or download this
         while ( my ($localValues) = $sth->fetchrow_array())
    
  6. or download this
      my $LINK_ID, $POI_ID, $FAC_TYPE, ....  $TEST_ID
    
  7. or download this
    while ( my (my $LINK_ID, $POI_ID, $FAC_TYPE, ....  $TEST_ID) = $sth->f
    +etchrow_array())
    
  8. or download this
    my $prepStatement = <<TO_END_SQL_STATEMENT;
    insert into ORACLE_TABLE 
    ...
    values 
    ( '$LINK_ID', $POI_ID, ..... , $TEST_ID' )  
    TO_END_SQL_STATEMENT