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:

  • sql read file line by line
  • perl dbi csv
  • java comma after loop
  • perl factorial function
  • python csv file sql query
  • read the keyboard perl
  • python binary read
  • how to read a file line by line perl csv
  • perl query local database file help
  • grep data in csv using perl

No comments yet.

Leave a Comment