Results 1 to 1 of 1
  1. #1
    Join Date
    Jul 2015
    Posts
    1

    Unanswered: Need Select Query using closed and reopened flag

    Hi,

    I am newbie to postgress.

    I have a dimension and a transaction_fact tables. transaction_fact table has multiple records of a single record of the dimension table. transaction_fact table has columns closed_today_flag, reopened_today_flag, effective_from, effective_till along with other columns.

    When a record is created in dimension table an entry will be added in transaction_fact table. If the same record is updated/closed/reopened entries will be added in the transaction_fact table.

    Dimension table will not have any status. Currently the record in a dimension table may be in open/closed/reopened state.

    Query:

    I have to select only closed records from transaction_fact table based on the current status from start date(effective_from) to end date(effective_till).

    Table script attached:
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

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