Confirm

Expand all | Collapse all

N/A permit status

Jump to Best Answer
  • 1.  N/A permit status

    Posted 09-29-2020 04:27
    Hello,

    I am trying to write a report to pull out permits that are only at the status of "N/A" - when I run the below SQL I can see that the "N/A" permits are blank in the permit status column of the report, but when I have tried to just get the N/A status it returns no results

    SELECT
    sw_notice_header.work_header_no,
    organisation.organise_code,
    organisation.organise_name,
    sw_header.works_ref,
    sw_notice_header.notice_issue_time,
    sw_notice_header.permit_status
    FROM
    organisation,
    sw_header,
    sw_notice_header,
    sw_notice_site
    WHERE
    organisation.organise_code = sw_header.organise_code AND
    sw_header.work_header_no = sw_notice_header.work_header_no AND
    sw_notice_header.work_header_no = sw_notice_site.work_header_no AND
    sw_notice_header.work_version_no = sw_notice_site.work_version_no AND
    sw_notice_header.notice_issue_time >= '01-apr-2020'

    Is anyone able to advise?

    thank you

    ------------------------------
    Richard White
    Hull City County Council
    HULL
    ------------------------------


  • 2.  RE: N/A permit status
    Best Answer

    Posted 09-29-2020 06:20
    Hi Richard,

    Hope you're well.

    You could try adding the following line to the WHERE clause:

    sw_notice_header.permit_status IS NULL

    Which should return those records with a blank permit status.

    Hope this helps!

    Cheers,
    Steve

    ------------------------------
    Steve Bish
    Senior Software Support Analyst
    Confirm
    ------------------------------



  • 3.  RE: N/A permit status

    Posted 09-29-2020 06:43
    Hi Steve,

    That's sorted it, thank you very much, we tried sw_notice_header.permit_status IS 'NULL' before but didn't try without the ' '

    Cheers


    ------------------------------
    Richard White
    Hull City County Council
    HULL
    ------------------------------