Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Is it possible.... Decimal(5,2) or (7,3)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
sreenigacc

New User


Joined: 16 Oct 2007
Posts: 15
Location: bangalore

PostPosted: Mon Oct 29, 2007 1:02 pm    Post subject: Is it possible.... Decimal(5,2) or (7,3)
Reply with quote

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
Back to top
View user's profile Send private message

guptae

Moderator


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

PostPosted: Mon Oct 29, 2007 1:17 pm    Post subject:
Reply with quote

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
Back to top
View user's profile Send private message
vijikesavan

Active User


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

PostPosted: Tue Oct 30, 2007 11:16 pm    Post subject: Reply to: Is it possible.... Decimal(5,2) or (7,3)
Reply with quote

Are you asking if a same column can be defined like decimal(5,2) or (6,2) ????
pls be more clear.
Thanks,
Viji
Back to top
View user's profile Send private message
sreenigacc

New User


Joined: 16 Oct 2007
Posts: 15
Location: bangalore

PostPosted: Tue Apr 15, 2008 8:19 pm    Post subject:
Reply with quote

hi vijikesavan,

yes, if we declare that for a same column what does it mean?

thanks
sreeni
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


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

PostPosted: Tue Apr 15, 2008 8:26 pm    Post subject:
Reply with quote

You can define it either way but NOT both!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Convert Decimal to hexadecimal Steve Ironmonger DFSORT/ICETOOL 5 Fri May 27, 2016 4:19 pm
This topic is locked: you cannot edit posts or make replies. JCL to convert float decimal into rea... polymathtarun JCL & VSAM 3 Sun May 15, 2016 9:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us