Recently encountered a DB2 field numerical problems, a half-day, found that the original is the Dbvisualer field display problem, hereby record this exception.
Test process:
1, build a table, simple test table:
CREATE TABLE
Usr. A_test
(
ID INTEGER not NULL,
NAME CHARACTER (4) Not NULL
);
2. Insert the data and insert a 16 binary field:
INSERT INTO USR. A_test (ID, Name) VALUES (3, X ' Ffffff20 ')
3, view the data, SQL query normal:
Select Hex (name) from Usr.a_test where ID =3
650) this.width=650; "title=" clip_image001 "style=" border-right-width:0px;background-image:none; border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px; " Border= "0" alt= "clip_image001" src= "Http://img1.51cto.com/attachment/201409/28/4828774_1411879924Arvj.png" width= "223" height= "/>"
4. Use Dbvisualizer's editor to view data:
650) this.width=650; "title=" clip_image002 "style=" border-right-width:0px;background-image:none; border-bottom-width:0px;padding-top:0px;padding-left:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt = "clip_image002" src= "Http://img1.51cto.com/attachment/201409/28/4828774_1411879928Pfrg.png" width= "311" height= " 236 "/>
Changed from FF to 3f ...
It seems that the command line is the most reliable.
Continue, there is no problem with the table that declares the for bit data:
1, build the table:
CREATE TABLE
Usr. A_test
(
ID INTEGER not NULL,
NAME CHARACTER (4) for bit data is not NULL
);
2. Insert Data:
INSERT INTO USR. A_test (ID, Name) VALUES (3, X ' Ffffff20 ')
3. View data:
Select Hex (name) from Usr.a_test where ID =3
650) this.width=650; "title=" clip_image001[1] "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "Clip_image001[1]" src= "Http://img1.51cto.com/attachment/201409/28/4828774_1411892548JnBD.png" height= "114"/ >
4. Use Dbvisualizer's editor to view data:
650) this.width=650; "title=" clip_image002[1] "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ IMAGE002[1] "src=" http://img1.51cto.com/attachment/201409/28/4828774_1411892552mc2L.png "height=" 244 "/>
This article is from the "Lifelong Learning" blog, please be sure to keep this source http://anfernee.blog.51cto.com/4828774/1559094
Dbvisualizer9.1 16 binary data processing exception on DB2 char field