[unixODBC-support] db2 null values

LocoJay Dev locojaydev at gmail.com
Wed Feb 22 00:47:48 GMT 2012


Hi 

when doing query on tables including null values i do not get these returned correctly.

for example 

create table test.unixodbc(col1 varchar(2), col2 varchar(2)) 
insert into test.unixodbc(col1,col2) values('a', 'b')
insert into test.unixodbc(col1) values('c')
insert into test.unixodbc(col2) values('d')

select * from test.unixodbc should return
	a, b
	c,
	  , d 

but i get
	a, b
	c,c
	c,d

here 's a pic: 
http://cl.ly/2V432r3i062o3o0H2h3L

vs another sql client:

http://cl.ly/3B1G343h3d0i112i2P39

i m using isql --version :

unixODBC 2.3.1

uname -a :
Darwin locojaymp.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 
PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64 

db is DB2 odbcinst.ini:
[DB2]
Description = IBM DB2 Adapter
Driver      = /Users/locojay/sqllib/lib/libdb2.dylib
FileUsage   = 1
DontDlClose = 1

here's the gist of the sql.log:

https://gist.github.com/1880240

Is there a config i have to set? it s not a display error as i do get the wrong values when using pyodbc as well.

Thanks for helping



More information about the unixODBC-support mailing list