Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2008
    Posts
    48

    Unanswered: Alter Table and affect on functions

    Hi, when i try to alter table db2 would not let, because there are functions and procedures refering table. I have to drop the procedures/ functions and alter table and then redeploy procedures/ functions.
    My procedures/ functions have specific name.

    Is there a better way ?

    Thanks in Advance

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    It depends. How are you trying to alter the table? Also include your DB2 version and OS.

    Andy

  3. #3
    Join Date
    Nov 2008
    Posts
    48
    DB2 9.7 and OS is Windows, i am trying to alter table from Control Center.

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    What are you trying to alter? Maybe if you supply the statement you are trying to perform....

    Andy

  5. #5
    Join Date
    Nov 2008
    Posts
    48
    i am try to change column from Character 6 to charcter 10 this column is used in function and removing one column this column is not used any procedure or function

  6. #6
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Quote Originally Posted by phil72
    Hi, when i try to alter table db2 would not let, because there are functions and procedures refering table. I have to drop the procedures/ functions and alter table and then redeploy procedures/ functions.
    My procedures/ functions have specific name.

    Is there a better way ?

    Thanks in Advance
    In light of what you are trying to do, this is the only way to do it.

    Andy

  7. #7
    Join Date
    Nov 2008
    Posts
    48
    Thanks
    one more question
    i have column that is character type i want to convert it decimal
    select CAST(mycol AS DECIMAL(8,4) ) from Admin.mytable
    it gives error if column has character value like 'NONE', 'NA' etc, Is there a function to check if column is Not a number

  8. #8
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    No built in function. You could make a UDF though.

    Andy

Posting Permissions

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