My Oracle Support Banner

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

Last updated on AUGUST 27, 2021

Applies to:

Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Schema Service - Version N/A and later
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

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.