Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    Nevada
    Posts
    5

    Unanswered: Create Updatable View

    Can anyone show me a create view that allows the tables in the view to be updatable. Every view I create sets the syscat.views readonly column to Y. So I can use the update statement in my view. How do I Make that a N in the syscat.views table ????

    Thank a head of time....

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: Create Updatable View

    If you are joining mutiple tables or using a function (like date(col2)) you cannot update it ...

    Post a few of your views and someone may be able to help

    Cheers
    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

    Re: Create Updatable View

    Originally posted by sathyaram_s
    If you are joining mutiple tables or using a function (like date(col2)) you cannot update it ...

    Post a few of your views and someone may be able to help

    Cheers
    Sathyaram
    I quote the manual here:

    "Updatable views:

    A column of a view is updatable if all of the following are true:
    the view is deletable
    the column resolves to a column of a base table (not using a dereference operation) and READ ONLY option is not specified
    all the corresponding columns of the operands of a UNION ALL have exactly matching data types (including length or precision and scale) and matching default values if the fullselect of the view includes a UNION ALL

    A view is updatable if ANY column of the view is updatable."

    For more details please see DB2 SQL manual.

Posting Permissions

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