Confirm

SQL for Uninspected Features

  • 1.  SQL for Uninspected Features

    Posted 16 days ago
    I have been struggling to write what I thought may be a simple piece of ORACLE SQL code for finding Inspection Route Features that were not inspected last month.

    Of course, some features may have been inspected early if an officer was going on holiday or inspected late if they were off sick.

    What I would like as some simple results would be something like :

    Feature   How inspected
    ABC123   In correct month
    ABC345   In correct month
    ABC456   In correct month
    ...
    PQR123   Inspected a month early
    PQR345   Inspected a month early
    PQR456   Inspected a month early
    ...
    XYZ123   Inspected a month late
    XYZ345   Inspected a month late
    XYZ456   Inspected a month late
    ...
    ZZZ123   NOT Inspected in Month Due
    ZZZ345   NOT Inspected in Month Due
    ZZZ456   NOT Inspected in Month Due

    Does anyone have some code that would produce something similar to this or could someone write something to start me off please?

    Thanks in anticipation,

    Barry



    ------------------------------
    Barry Jones
    Cheshire West and Cheshire
    Winsford
    ------------------------------