IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

CONVERT DECIMAL DATATYPE


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
premkumar82

New User


Joined: 24 Feb 2006
Posts: 8
Location: chennai

PostPosted: Tue Jun 20, 2006 6:50 pm
Reply with quote

my requirement is

increase decimal (7,2) to decimal (11,2) IN DB2

i ve used both
1)ALTER TABLE DSN8810.EMP ALTER COLUMN EDLEVEL SET DATATYPE DECIMAL(11,2); does't work

2)ALTER TABLE DSN8810.EMP MODIFY EDLEVEL DECIMAL(11,2); does't work

ANYBODY HELP ME
ANY CORRECT QUERY
Back to top
View user's profile Send private message
vicky10001
Warnings : 1

Active User


Joined: 13 Jul 2005
Posts: 136

PostPosted: Tue Jun 20, 2006 7:10 pm
Reply with quote

In Alter command only used to add columns.
I think,It is not possible in db2

Thanks,
vy
Back to top
View user's profile Send private message
vicky10001
Warnings : 1

Active User


Joined: 13 Jul 2005
Posts: 136

PostPosted: Tue Jun 20, 2006 7:57 pm
Reply with quote

Please try this
Syntax

ALTER TABLE <tablename>
ALTER COLUMN <columnname>
SET DATATYPE <newdatatype> ;



Ex:

ALTER TABLE CUSTOMER COLUMN ADDRESS SET DATA TYPE CHAR (55)
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Convert CSV to flat file. DFSORT/ICETOOL 6
No new posts convert arbitrary UTC to local (SYD) ... COBOL Programming 1
No new posts Convert Service Unit to CPU Seconds All Other Mainframe Topics 1
No new posts Help required to reset decimal points... DFSORT/ICETOOL 10
No new posts Unable to interpret a hex value to De... COBOL Programming 7
Search our Forums:


Back to Top