Different behaviour comparing smallint integer INT function



IBM's flagship relational database management system

Different behaviour comparing smallint integer INT function

Postby tivrfoa » Wed Nov 12, 2014 1:57 am

Hello,

DB2 10.01 for ZOS
DSN10015

One program has a query that joins table A with table B:

select some-column
from table-a a, table-b b
where a.id = int(b.id)

a.id is INTEGER
b.id is SMALLINT

It displays different results if a remove INT function. Is this function necessary?
What does it do?

I searched for this function but I didn't find info for DB2 for ZOS 10. Only found:
https://publib.boulder.ibm.com/iseries/ ... HDRINTFUNC
http://www-01.ibm.com/support/knowledge ... -10-3-2-69

The INTEGER (or INT) function returns an integer representation of:
A number
A string representation of a number
A date value
A time value
tivrfoa
 
Posts: 83
Joined: Wed Aug 22, 2012 6:35 pm
Has thanked: 58 times
Been thanked: 0 time

Re: Different behaviour comparing smallint integer INT function

 

Re: Different behaviour comparing smallint integer INT funct

Postby tivrfoa » Wed Nov 12, 2014 2:09 am

found info for db2 zos v.10, but I still don't understand why the different behavior.
http://www-01.ibm.com/support/knowledge ... teger.dita
tivrfoa
 
Posts: 83
Joined: Wed Aug 22, 2012 6:35 pm
Has thanked: 58 times
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post