When Not Null Is Used In Where Clause Via Dg4odbc Varchar Columns are Null (Doc ID 1354889.1)

Last updated on JANUARY 18, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.1 to 11.2.0.2 [Release 11.2]
Information in this document applies to any platform.

Symptoms

When the Database Gateway for ODBC (DG4ODBC)  is used with the  SQLBase ODBC driver and  "NOT NULL" is used in a WHERE clause then VARCHAR columns from the table are empty.
For example -

select * from table where a is not null ; ===>All varchar-Columns in resultset are null


select * from table where b = x; ====<All varchar-Columns in resultset are filled



SQL> select employeeId, city from mydb.emp@SQLBase where employeeId is not null;

EMPLOYEEID C                                                                   
---------- -                                                                   
       376                                                                     
       400                                                                     
       452                                                                     
       251                                                                     
       294                                                                     
       300                                                                     
       498                                                                     
       499                                                                     
         0                                                                     
       302                                                                     
       301     
                                                               
Although this statement is OK:

SQL> select employyeId, city from mydb.emp@SQLBase where employeeId > 0;

EMPLOYEEID CITY                                                         
---------- ------------------------------                                      
       376 Berlin                                                   
       400 Paris                                                        
       452 Barcelona                                               
       251 Munich                                                  
       294 London                                      
       300 Southampton                                                         
       498 Roma                                                              
       499 Madrid                                                             
       302 Bruxelles                                                        
       301 Turino                                                       
       203 Budapest       

                
                             

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms