Hi guys
I was wondering if you could help me.
I have the following SQL query on command-line and I get the resulting data
:
 
1> select ITEM_ID,START_DATE, END_DATE from tableABC where ACCOUNT = 2435
and
 SEQ = 16 and DATE = 19971208
2> go
 ITEM_ID           START_DATE                 END_DATE
 ----------------- --------------------     ------------------
 ABC3M                         19940111           19991213
 ABCBM                         19960912           19980420
 ABCRM                         19960912           19980420
 ABCSM                         19960912           19980420
 ABCUM                         19940111           19980420
 ABCN2                         19990930                  0
 ABCEM                         19960512                  0
 ABCEP                         19990603                  0
 ABCBM                         19960912                  0
 UNDIR                         19940111                  0
 
(10 rows affected)
 
If I put this query into the prepare statement of my DBI code as follows :
 
$supplementary_services_sth = $dbh->prepare("select
                                             ITEM_ID,
                                             START_DATE,
                                             END_DATE
                                             from tableABC
                                             where ACCOUNT = $account
                                             and SEQ  = $seq
                                             and DATE = $date");
 
$sth->execute
        or die "Unable to execute the SQL Statement : $DBI::errstr\n";
 
$sth->bind_columns(\($item, $start_date, $end_date));
 
     while($sth->fetchrow_array) {
      some code....
     }
          
After I execute my code, I appear to be obtaining only those rows that
END_DATE <> 0
Any ideas why the code is not picking ALL rows ?
 
I would be most grateful.
Cheers
Tony


Tony Ho
Lucent Technologies
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

 
 

Reply via email to