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

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:

  • win32 perl output to csv file
  • sql query read csv
  • python csv file sql query
  • Perl file query "-f"
  • perl read file to 2d array
  • binary read in python
  • java.nio.Files.readAllLines
  • perl dbi csv
  • python create xml string
  • perl file database

No comments yet.

Leave a Comment