Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Perl: Read a CSV File using SQL Query

Perl: Read a CSV File using SQL Query
{filelink=14660}

#!/usr/bin/perl
use DBI;
$csv_connect = DBI->connect("dbi:CSV:f_dir=c:/test.csv", "", "",
                    { AutoCommit => 1, RaiseError => 1 });
 # Execute the given SQL Statement
$req_stmt = $csv_connect->prepare("SELECT FirstName, LastName FROM Users");
$req_stmt->execute( );
# AfficherFetch a result row as an associative array
while (@row = $req_stmt->fetchrow_array)
{
  print @row,"";
}
$req_stmt->finish( );
$csv_connect->disconnect( );

Users who found this page were searching for:

  • how to read a file line by line perl csv
  • sql query read csv
  • perl query local database file help
  • perl sql create statement
  • python program for list of square root numbers
  • using sql with perl
  • python csv file sql query
  • Perl file query "-f"
  • perl file database
  • enter button event python

No comments yet.

Leave a Comment