convert 999999 to 999,999 in db2

Joe Joyce

convert 999999 to 999,999 in db2
I am new to db2. many years of oracle. trying to convert 999999 to 999,999.
Was wondering if there was a predefined function to allow this.

In sqlPlus it would be select to_char(999999,'999,999') from dual;

Anything like that in db2?

thanks,

joe

---------------------------------------------------------------------------------
Welcome to the DB2 User Group - Central Pennsylvania list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/DB2-UG-Central-PA.html. From that page select "Join or Leave the list". The IDUG Listserv FAQ is at http://www.idugdb2-l.org. The DB2 User Group - Central PA List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Song Dudley

Re: convert 999999 to 999,999 in db2
(in response to Joe Joyce)
This should do the job.


SELECT CHAR(999999) FROM SYSIBM.SYSDUMMY1;

-----Original Message-----
From: DB2 User Group - Central Pennsylvania List
[mailto:[login to unmask email] On Behalf Of Joe Joyce
Sent: Sunday, January 13, 2008 1:36 PM
To: [login to unmask email]
Subject: convert 999999 to 999,999 in db2

I am new to db2. many years of oracle. trying to convert 999999 to
999,999.
Was wondering if there was a predefined function to allow this.

In sqlPlus it would be select to_char(999999,'999,999') from dual;

Anything like that in db2?

thanks,

joe

------------------------------------------------------------------------
---------
Welcome to the DB2 User Group - Central Pennsylvania list. To
unsubscribe, go to the archives and home page at
http://www.idugdb2-l.org/archives/DB2-UG-Central-PA.html. From that page
select "Join or Leave the list". The IDUG Listserv FAQ is at
http://www.idugdb2-l.org. The DB2 User Group - Central PA List Admins
can be reached at [login to unmask email] Find out
the latest on IDUG conferences at http://conferences.idug.org/index.cfm

---------------------------------------------------------------------------------
Welcome to the DB2 User Group - Central Pennsylvania list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/DB2-UG-Central-PA.html. From that page select "Join or Leave the list". The IDUG Listserv FAQ is at http://www.idugdb2-l.org. The DB2 User Group - Central PA List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm