Hi Celia:

In many cases its easy to get SQL database info into a 2D PDL.

We use postgres, so I often say something like:

my $db     = "dbi:Pg:dbname=$dbname;host=$dbhost";
my $dbh    = DBI->connect($db);
die "Cannot connect to database = $dbname, dbhost = $dbhost"
unless (defined($dbh));

my $sql = "select id, value1, value2 from table1 where ...";

my $p = pdl ( $dbh->selectall_arrayref($sql) );

This works provided all the selected values are numeric.

Regards,

  Doug

[EMAIL PROTECTED]
Software Engineer III
UCAR - COSMIC, Tel. (303) 497-2611

On Wed, 28 Jun 2006, [EMAIL PROTECTED] wrote:


I sort of got into PDL because it sounded a very interesting way to do data
manipulation.  But I found it very hard to get going. I also found it was
hard to find stuff unless you exactly knew what you where doing and what it
was named.  It was also very hard to find example scripts.   I love example
scripts it is how I learn stuff.

My problem was that most of my files where in comma delimited format or
from relational databases ( which I used a dbi modules to get).  I really
wanted example of how to get data from the following sources into PDL.  But
I found it hard to find resources and also ran out of time.  So I didn't
end up doing it.

Celia






            Donald Jackson
            <[EMAIL PROTECTED]
            ms.com>                                                    To

            28/06/2006 12:43                                           cc
            AM
                                                                  Subject
                                      Re: PDL Getting Started book Re:
                                      [Perldl] IDL thing










As a newbie user, I can attest to the need- the POD is pretty good, but
it's like a dictionary: you need to know what to look for in order to
find it!

I'd happily volunteer as a guinea pig for testing drafts on.

Don Jackson

Xavier Calbet wrote:

 If you all agree, we could start writing
a simple introductory PDL book...



_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl






_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl


_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to