in reply to Re: Perl DBI
in thread Perl DBI

Thanks for your response. selectall_arrayref will take more time to select all the records from the table.The performance is more or less similar to mine. It takes around 2-3 minutes of span.Some seconds prior to my code.Also I did not get the required output. Any idea? Anyways I will also work on your code.

Replies are listed 'Best First'.
Re^3: Perl DBI
by poj (Abbot) on Jun 30, 2013 at 07:12 UTC

    Add table name to * in SQL here ;

    $db{$tbl} = $dbh->selectall_arrayref("SELECT NE,$tbl.* FROM $tbl");
    Seems that without table name Access interprets * as all fields not already specified.

    poj

      Can u please explain this statement?what is the reason for placing the NE as the first column?

      arun

        So that you can filter the records here
        if (( $_->[0] eq $bsc ) && ( $_->[3] > $thresh )){
        poj

      SELECT * FROM $tbl; this statement also has the same effect? what is the differnce between your statement and the statement above?(may be in terms of performance)

      arun

        If the first field of your tables is not NE then $_->[0] eq $bsc will not work. Using * is not recommended, apart from the performance issue you are at risk of a table change breaking your script.

        poj