The dbo.QUERYPREFS table contains all preferences set on individual queries using Tools > Query Options in The Raiser's Edge.  The PREFCONST field contains enumerated values for each preference with 77 being the preference tied to gift processing "Credit Soft Credits to" and 0-3 for Donor, Recipients, or both. The following SQL will return the name and description of all queries that have "Recipients" selected in the query options.  

SELECT q.NAME, q.DESCRIPTION
FROM dbo.QUERIES2 q
JOIN dbo.QUERYPREFS qp ON qp.QUERIESID = q.QUERIESID
WHERE qp.PREFCONST = 77 and qp.PREFVAL = 1


Disclaimer: We provide programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes you are familiar with Structured Query Language and the tools used to create and modify SQL statements and Crystal Reports. Our Customer Support may help explain the functionality of a particular procedure, but we will not modify, or assist you with modifying, these examples to provide additional functionality.