The SITECONTENT SQL table in Blackbaud NetCommunity contains most of the page related data while you can locate Merchant information in the MERCHANTACCOUNT table and Designation information in the DESIGNATION table. Examples of SQL queries to pull that information are listed below.

--part id information
select sc.ID as 'Part ID', * from SITECONTENT sc
where sc.Title like '%donation form%'

--merchant account id information
select ma.ID as 'Merchant Account ID', * from MERCHANTACCOUNT ma

--designation id information
select ds.ID as 'Designation ID', *  from DESIGNATION ds

--page URL information
SELECT CAST(SiteContent.Title as varchar(100)) AS 'Donation Form Part Name', 
PageContent.SitePagesID AS 'Netcommunity Page ID', 
SiteContent.Deleted As 'Is Part Deleted?', 
SiteContent.InTrashBin AS 'Is Part in Trash bin?', 
ClientSites.Name AS 'Netcommunity Site Name', 
CMSSITESETTING.VALUE + 'page.aspx?pid=' + CAST(PageContent.SitePagesID as varchar) AS 'Donation Form URL', 
Sitepages.PageName, 
CMSSITESETTING.VALUE + CAST(Sitepages.URL as varchar) AS 'Friendly Donation Form URL'

FROM SiteContent
INNER JOIN PageContent ON SiteContent.ID = PageContent.SiteContentID 
INNER JOIN ContentTypes ON SiteContent.ContentTypesID = ContentTypes.ID 
INNER JOIN ClientSites ON SiteContent.ClientSitesID = ClientSites.ID 
INNER JOIN dbo.SitePages ON PageContent.SitePagesID=SitePages.ID 
INNER JOIN CMSSITESETTING ON ClientSites.ID = CMSSITESETTING.CLIENTSITESID

WHERE (ContentTypes.ID = 45) AND (CMSSITESETTING.SETTING = N'AppPathURL')
ORDER BY ClientSites.Name

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.