[Bioperl-l] DB2 driver for BioPerl

Hilmar Lapp hlapp at gmx.net
Thu Aug 6 13:42:06 UTC 2009


On Aug 6, 2009, at 5:38 AM, Florian Mittag wrote:

> Is there a way to change the "NULL" to "cast(NULL as VARCHAR(255))"  
> only when the driver is DB2?


Not yet, but that's the solution I had in mind, i.e., introducing a  
method in the Bio::DB::DBI::* (driver-specific) classes that returns  
whatever NULL as a SELECT field should be represented as. What will be  
very hard or nearly impossible to do is to cast to the actual type of  
the column, so if simply using VARCHAR(255) does the trick for DB2  
that'd be great. <sigh/>

BTW you did check that simply aliasing the column does not fix the  
problem for DB2, right? I.e., "SELECT NULL AS col1 FROM bioentry" will  
throw an error, right?

	-hilmar
-- 
===========================================================
: Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
===========================================================






More information about the Bioperl-l mailing list