I have this SQL query that works in the management studio, but I get an error message when I try using it in Leap. I’m fairly new to SQL so it’s quite possible there’s something obvious I’m missing - can anyone tell me what’s causing the error? Trying to pull all items currently on hold at a certain branch and their corresponding patron names.
select pr.PatronFullName,br.SortTitle,hpu.abbreviation as PickupBranchAbbr,hs.Description as HoldStatusDescr
from Polaris.Polaris.SysHoldRequests hr with (nolock) inner join Polaris.Polaris.Organizations hpu with (nolock) on (hr.PickupBranchID = hpu.OrganizationID)
inner join Polaris.Polaris.SysHoldStatuses hs with (nolock) on (hr.SysHoldStatusID = hs.SysHoldStatusID)
inner join Polaris.Polaris.BibliographicRecords br with (nolock) on (hr.BibliographicRecordID = br.BibliographicRecordID)
inner join Polaris.Polaris.Patrons p with (nolock) on (hr.PatronID = p.PatronID)
inner join Polaris.Polaris.PatronRegistration pr with (nolock) on (pr.PatronID = hr.PatronID) where hr.PickupBranchID in (4)
and hr.SysHoldStatusID in (6)