/[corp]/esi/dump.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /esi/dump.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (vendor branch)
Thu Mar 15 07:51:21 2001 UTC (23 years, 1 month ago) by dpavlin
Branch: DbP
CVS Tags: r1
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
initial import

1 dpavlin 1.1 #!/usr/local/bin/perl -w
2    
3     use DBI;
4    
5     my $connect = "DBI:Pg:dbname=corp";
6     my $sql="select lse.date,lse.current as lse,ftse.current as ftse
7     from stocks as lse,stocks as ftse where lse.date=ftse.date
8     and lse.type='LSE' and ftse.type='FTSE'
9     order by date";
10    
11     my $dbh = DBI->connect("$connect","","") || die $DBI::errstr;
12    
13     $dbh->do("set datestyle='german'") || die $dbh->errstr();
14    
15     $sth = $dbh->prepare("$sql") || die $dbh->errstr();
16     $sth->execute() || die $sth->errstr();
17    
18     print "#",join("\t",@{ $sth->{NAME} }),"\n";
19     while (@arr = $sth->fetchrow_array() ) {
20     print join("\t",@arr),"\n";
21     }

  ViewVC Help
Powered by ViewVC 1.1.26