Get List of Branches Excluded for Hold Pickup

Get List of Branches Excluded for Hold Pickup

This is a quick and dirty query that pulls a list of branches that have hold pickup exclusions assigned to them.

SELECT
    o.Name AS [Library/Branch],
    e.Name AS [Excluded Branch]

FROM
    Polaris.Polaris.HoldsPickupBranchesExclude hpbe WITH (NOLOCK)

INNER JOIN
    Polaris.Polaris.Organizations o WITH (NOLOCK)
    ON (o.OrganizationID = hpbe.OrganizationID)
INNER JOIN
    Polaris.Polaris.Organizations e WITH (NOLOCK)
    ON (e.OrganizationID = hpbe.ExcludedBranchID)

WHERE
    hpbe.Exclude = 1

ORDER BY
    o.Name,
    e.Name

If you need to see which branches are excluded from the perspective of the patron’s registered branch, for a single you can also run:

exec polaris.polaris.SA_LoadPickupBranchExclusions 8, 1 --replace #8 with patron's registered branch

4 posts were split to a new topic: Innovative reusing user generated code