Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Posts
    12

    Unanswered: Character to Integer

    Hi There,

    I am kinda new to DB2 and have a question, may be simple for experienced people.
    I created a a couple of columns in DB2 with datatype as character. Now I want to change the datatypes of these columns to integer. When I tried to do that using "Alter Table" GUI interface, the datatype field is protected and it does not allow me to change.
    Can anyone please help me by explaining how to do it...??? It would be great if you can give me the SQL or let me know as to why am I not allowed to edit the datatype field in the GUI interface of DB2.

    Thanks,
    Shyam.

    P.S: For your reference, I have attached a screen shot of the Change column screen where the datatype field is protected.
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5

    Re: Character to Integer

    Shyam,
    Changing datatypes is not allowed in DB2-period. The only thing that can be changed about a column in DB2 is to increase the length of a varchar.

    Andy

    Originally posted by shyams75
    Hi There,

    I am kinda new to DB2 and have a question, may be simple for experienced people.
    I created a a couple of columns in DB2 with datatype as character. Now I want to change the datatypes of these columns to integer. When I tried to do that using "Alter Table" GUI interface, the datatype field is protected and it does not allow me to change.
    Can anyone please help me by explaining how to do it...??? It would be great if you can give me the SQL or let me know as to why am I not allowed to edit the datatype field in the GUI interface of DB2.

    Thanks,
    Shyam.

    P.S: For your reference, I have attached a screen shot of the Change column screen where the datatype field is protected.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •