Home Forums SQL Server 2008 T-SQL (SS2K8) Need help to eliminate values from resultant record using view RE: Need help to eliminate values from resultant record using view

  • SELECT *

    FROM Vu_CurRating

    WHERE CatId <> 7

    AND NOT (

    actiontype in ('withdrawn','Discontinued','Matured','Withdrawn from Public')

    AND rhdate < (select getdate()-1095)

    )

    AND NOT (

    ltrating LIKE 'D%'

    AND rhdate < (select getdate()-365)

    )

    ORDER BY SectorCode, companyname,CatId


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]