Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2002
    Location
    Madrid - Spain
    Posts
    422
    Provided Answers: 1

    Unanswered: refresh the data in a table in a view

    good morning,
    I have DB2 V8 32-bit AIX 5.3.
    If I create a view based on a table, the information contained in the base table is refreshed when the view?

    Thank you very much and best regards.
    DBA DB2 for LUW

  2. #2
    Join Date
    Jun 2007
    Location
    germany
    Posts
    155
    not sure what you are saying,
    but,
    a view is nothing but a SELECT <select list> FROM <table(s)>.
    the data is not contained in the view,
    the view is a result set of the base table(s) based on the select-list and WHERE Clauses.
    there is no data in a VIEW.

    REFRESH has a particular meaning in DB2,
    and does not apply here.

    if the base table is updated,
    while you are 'viewing' the results of a VIEW,
    you must execute your SQL again to see the 'updated' results-set.
    Last edited by dbzTHEdinosaur; 11-14-12 at 10:11. Reason: add a little more info.
    Dick Brenholtz, Ami in Deutschland

  3. #3
    Join Date
    Dec 2002
    Location
    Madrid - Spain
    Posts
    422
    Provided Answers: 1
    Thank you for your prompt response,

    I have an application that reads data from tables, but there are other processes that read data from these tables and in turn generate blocks, the goal is to create views of those tables for an application reads data from the view and not from the tables .

    Greetings.
    DBA DB2 for LUW

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    You're probably thinking about materialized query tables? Views will not solve your locking problems.
    ---
    "It does not work" is not a valid problem statement.

  5. #5
    Join Date
    Jul 2009
    Location
    NY
    Posts
    963

    Lightbulb

    Quote Originally Posted by georgipa View Post
    good morning,
    I have DB2 V8 32-bit AIX 5.3.
    If I create a view based on a table, the information contained in the base table is refreshed when the view?

    Thank you very much and best regards.
    A: When you update the table, the view will show changes, if in a view definition you don't have a filter them.

    Lenny

  6. #6
    Join Date
    Dec 2002
    Location
    Madrid - Spain
    Posts
    422
    Provided Answers: 1
    but when i execute a query on the view, the data is search in table?

    Greetings.
    DBA DB2 for LUW

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

    My answer is too short for this forum.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

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