Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
sreenigacc

New User

Joined: 16 Oct 2007
Posts: 15
Location: bangalore

 Posted: Mon Oct 29, 2007 1:02 pm    Post subject: Is it possible.... Decimal(5,2) or (7,3) Hi All, Could you please let me know that, Is it possible to declare the datatype(DECIMAL) in DB2 as shown below salary decimal(5,2) or (6,2) i) is it possible to declare ? ii) if yes, what's the meaning of the above declaration ? Thanks in advance Sreenivasulu G

guptae

Moderator

Joined: 14 Oct 2005
Posts: 1191
Location: Bangalore,India

Posted: Mon Oct 29, 2007 1:17 pm    Post subject:

Hi There,

Yeap u can declare

 Code: SALARY      DECIMAL(5, 2)

it means it can store upto 5 digit 3 befor precion & 2 after precion

OR
 Code: SALARY      DECIMAL(6, 2)

it means it can store upto 6 digit 4 befor precion & 2 after precion.
Please refer the manual for data type supportrd in DB2
vijikesavan

Active User

Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

 Posted: Tue Oct 30, 2007 11:16 pm    Post subject: Reply to: Is it possible.... Decimal(5,2) or (7,3) Are you asking if a same column can be defined like decimal(5,2) or (6,2) ???? pls be more clear. Thanks, Viji
sreenigacc

New User

Joined: 16 Oct 2007
Posts: 15
Location: bangalore

 Posted: Tue Apr 15, 2008 8:19 pm    Post subject: hi vijikesavan, yes, if we declare that for a same column what does it mean? thanks sreeni
Craq Giegerich

Senior Member

Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

 Posted: Tue Apr 15, 2008 8:26 pm    Post subject: You can define it either way but NOT both!
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics How to group and sum the decimal value sakrat DFSORT/ICETOOL 2 Tue Mar 06, 2018 9:13 pm Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us