Archives of the TeradataForum
Message Posted: Fri, 25 Apr 2003 @ 14:55:48 GMT
Subj: | | Re: Perl and teradata |
|
From: | | Jason Fortenberry |
Assuming you are familiar with Perl, you should download the DBI driver for Teradata (version 1.12 is good) from CPAN.
Then in your Perl script do something like this:
use DBI;
my $dbh = DBI->connect(
"dbi:Teradata:[IP address here]",
"[username here]",
"[password here]")
or die;
$sth = $dbh->prepare("Select * from tableX");
$sth->execute();
Then run through your return set with:
while ( @row = $sth->fetchrow_array ){
do something;
}
--Jason Fortenberry
|