Why not use the following SELECT statement: select col1 from jenny where col1<>0 and col1 is not null
That should do the trick nicely. :) Gordon Dewis Production Officer Geography Division Statistics Canada (613)951-4591 -----Original Message----- From: Liu, Jenny [mailto:[EMAIL PROTECTED]] Sent: October 16, 2002 13:10 To: [EMAIL PROTECTED] Subject: FW: question on null or 0 The following simple sql statement just try to select a column from a table. But if the value is 0 or null, the row will not be printed. Is there any way I can make all the rows printed? The col1 is a integer data type in table. Thanks $Sql_stmt = "select col1 from jenny "; my $sth_1 = $dbh->prepare($Sql_stmt); $sth_1->execute; while( $col1 = $sth_1->fetchrow_array){ print qq($col1 ** \n); }