Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return boolean in Select statement - AS400 DB2

Status
Not open for further replies.

banzairun

Programmer
Oct 17, 2003
4
GB
Hi,

Is it possible to return a boolean data type in a select statement from DB2 on AS400?

I'm presently resolving to binary and then resolving back to boolean in my application.

Not the most efficient (or overly troubling issue, I admit) way to do it and would be useful to know for sure one way or the other.

Thanks, Matt
 
I believe the only datatypes the as400 supports are: SMALLINT, INTEGER, BIGINT, DECIMAL, FLOAT (REAL and DOUBLE), CHAR, VARCHAR, CLOB, GRAPHIC, VARGRAPHIC, DBCLOB, BLOB, DATE, TIME, TIMESTAMP, and DATALINK.

Since boolean is not one of them, I don't imagine you can return it. We always use a char(1) and assign it either Y or N.
 
Thought as much, hence me using 0/1.

N'er mind, thanks anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top