Shared SQL Queries

1 post / 0 new
admin
Shared SQL Queries

CORE QUERIES FOR DATABASE TOOL
Patron Information
SELECT PATRON.INSTITUTION_ID AS PAT_INSTID, PATRON_BARCODE.PATRON_BARCODE AS PAT_BARCODE, PATRON_GROUP.PATRON_GROUP_NAME AS PAT_GROUP, PATRON_BARCODE_STATUS.BARCODE_STATUS_DESC AS PAT_STATUS, PATRON.CREATE_DATE AS PAT_CREATEDATE, PATRON.MODIFY_DATE AS PAT_MODIFYDATE, PATRON_NOTES.NOTE AS PAT_DEPARTMENT, PATRON_STATS.PATRON_STAT_ID, PATRON_STAT_CODE.PATRON_STAT_DESC FROM ((((PATRON_GROUP INNER JOIN (PATRON INNER JOIN PATRON_BARCODE ON PATRON.PATRON_ID = PATRON_BARCODE.PATRON_ID) ON PATRON_GROUP.PATRON_GROUP_ID = PATRON_BARCODE.PATRON_GROUP_ID) INNER JOIN PATRON_BARCODE_STATUS ON PATRON_BARCODE.BARCODE_STATUS = PATRON_BARCODE_STATUS.BARCODE_STATUS_TYPE) INNER JOIN PATRON_NOTES ON PATRON.PATRON_ID = PATRON_NOTES.PATRON_ID) INNER JOIN PATRON_STATS ON PATRON.PATRON_ID = PATRON_STATS.PATRON_ID) INNER JOIN PATRON_STAT_CODE ON PATRON_STATS.PATRON_STAT_ID = PATRON_STAT_CODE.PATRON_STAT_ID WHERE (((PATRON_GROUP.PATRON_GROUP_NAME) Not Like "UB*") AND ((PATRON_BARCODE_STATUS.BARCODE_STATUS_DESC)="Active"));