none
View Script RRS feed

  • Question

  • Hi All,

    How to create a view script where -

    SELECT DISTINCT
      dbo.GetMonthForDate(CLAIM_DATE_CLOSED) CLAIMS_DATE_CLOSED_MONTH_KEY,
       RECORD_SOURCE_BROKER_MONTH_KEY,
      dbo.GetMonthName(dbo.GetMonthForDate(CLAIM_DATE_CLOSED)) CLAIMS_DATE_CLOSED_MONTH_NAME
    FROM
      DWUQV_CLAIM
      WHERE 

                                                                   CLAIM_STATUS_LATEST='Approval Declined' or
    CLAIM_STATUS_LATEST='Finalised - No Cover' or
    CLAIM_STATUS_LATEST='Finalised – Repudiated' or
                                                                    CLAIM_STATUS_LATEST='Open – Repudiated ' or
    CLAIM_STATUS_LATEST='Rejected - File Closed' or
    CLAIM_STATUS_LATEST='Repudiated' or                                 
                                                                 CLAIM_STATUS_LATEST='Stage 6.3: Decline repair' or
    CLAIM_STATUS_LATEST='Repudiated - Ombudsman Pending' or
    CLAIM_STATUS_LATEST='Repudiated (Payment to Supplier)'

    Thursday, June 6, 2019 1:15 PM

Answers

  • CREATE VIEW ViewName

    AS

    SELECT DISTINCT
      dbo.GetMonthForDate(CLAIM_DATE_CLOSED) CLAIMS_DATE_CLOSED_MONTH_KEY,
       RECORD_SOURCE_BROKER_MONTH_KEY,
      dbo.GetMonthName(dbo.GetMonthForDate(CLAIM_DATE_CLOSED)) CLAIMS_DATE_CLOSED_MONTH_NAME
    FROM
      DWUQV_CLAIM
      WHERE 

                                                                   CLAIM_STATUS_LATEST='Approval Declined' or
    CLAIM_STATUS_LATEST='Finalised - No Cover' or
    CLAIM_STATUS_LATEST='Finalised – Repudiated' or
                                                                    CLAIM_STATUS_LATEST='Open – Repudiated ' or
    CLAIM_STATUS_LATEST='Rejected - File Closed' or
    CLAIM_STATUS_LATEST='Repudiated' or                                 
                                                                 CLAIM_STATUS_LATEST='Stage 6.3: Decline repair' or
    CLAIM_STATUS_LATEST='Repudiated - Ombudsman Pending' or
    CLAIM_STATUS_LATEST='Repudiated (Payment to Supplier)'

    GO


    Ousama EL HOR

    [If a post helps to resolve your issue, please click the "Mark as Answer"  of that post or click Answered "Vote as helpful"  button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]


     [User Page]     [MSDN Page]     [Blog]     [Linkedin]

    Thursday, June 6, 2019 1:21 PM
    Answerer