Thread '$' in SQL with Perl's Variable? (4 answers)
Opened by Updecrator at 2007-01-09 09:44

Updecrator
 2007-01-09 11:42
#72983 #72983
User since
2005-11-16
17 Artikel
BenutzerIn
[default_avatar]
Hi, renee,

thank you very much!  
i think I got the wished answer,
- I use Sqlite3:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! use /usr/bin/perl;

use strict;
use warnings;
use DBI;

my $result;
my $file = 'testSelect.sql';
my $dbh = DBI->connect("dbi:SQLite:dbname=Test.db","","");

open my $fh, '<', $file or die $!;
while (my $sql = <$fh>)
{
$dbh->do($sql) or die $dbh->errstr();
}
close $fh;

$dbh->disconnect;


Best wishes

View full thread '$' in SQL with Perl's Variable?