# Get List of Branches Excluded for Hold Pickup

**URL:** https://forum.innovativeusers.org/t/get-list-of-branches-excluded-for-hold-pickup/1189
**Category:** Polaris Repository
**Tags:** cp-migration, polaris-holds
**Created:** [June 2, 2023, 8:59pm UTC](https://forum.innovativeusers.org/t/get-list-of-branches-excluded-for-hold-pickup/1189 "2023-06-02T20:59:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://forum.innovativeusers.org/uploads/db7787/original/2X/8/8519ee8eef6492f310ea87d4ce482d931f01eef2.png) [@system](https://forum.innovativeusers.org/u/system)
#### Post date: [June 2, 2023, 8:59pm UTC](https://forum.innovativeusers.org/t/get-list-of-branches-excluded-for-hold-pickup/1189/1 "2023-06-02T20:59:51Z")

</div>

# 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.

```sql
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

```

---

<div class="post-metadata">

### Author: ![wesochuck](https://forum.innovativeusers.org/user_avatar/forum.innovativeusers.org/wesochuck/32/499_2.png) [@wesochuck](https://forum.innovativeusers.org/u/wesochuck)
#### Post date: [February 11, 2025, 9:42pm UTC](https://forum.innovativeusers.org/t/get-list-of-branches-excluded-for-hold-pickup/1189/2 "2025-02-11T21:42:02Z")

</div>

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

```

---

<div class="post-metadata">

### Author: ![wesochuck](https://forum.innovativeusers.org/user_avatar/forum.innovativeusers.org/wesochuck/32/499_2.png) [@wesochuck](https://forum.innovativeusers.org/u/wesochuck)
#### Post date: [February 12, 2025, 10:28pm UTC](https://forum.innovativeusers.org/t/get-list-of-branches-excluded-for-hold-pickup/1189/3 "2025-02-12T22:28:29Z")

</div>

4 posts were split to a new topic: [Innovative reusing user generated code](https://forum.innovativeusers.org/t/innovative-reusing-user-generated-code/2207)
