EXCEPTIONS |
<small><i>not set</i></small> |
DATASOURCE |
rds_mwv_2016 |
SQL |
SELECT
a.subcategoryname,
b.categoryname,b.seocategorydirectory,
d.bv,d.companyname,d.directlink,d.ct,d.cv,d.description,d.directions,d.duestype,d.ecofriendly,d.emailaddress,d.featured,d.fv,
d.giftcertlink,d.gpscoordinates,d.gv,d.hours,d.jv,d.mailzip,d.memberid,d.membertype,d.menu_link,d.nc,d.ncv,d.nightlife,
d.petfriendly,d.phone,d.physaddress,d.physcity,d.physstate,d.picture,d.prephone,d.pretoll,d.price,d.resurl,d.se,
d.secondweblinkdesc,d.secondweblinkpath,d.seomemberfilename,d.seostatedirectory,d.showmailaddress,d.specials,d.textblurb,
0 as feat_count,
d.tollfree,d.valleyoriginal,d.videocode,d.webaddress,d.webexception,d.weblink,d.worldres,d.worldresid
,b.categoryid,b.pageid,a.subcategoryid
FROM tbl_Types_Members_SubCategory as a
INNER JOIN tbl_Types_Members_Category as b ON a.CategoryID = b.CategoryID
INNER JOIN tbl_Members_MemberCategory as c ON a.SubCategoryID = c.SubCategoryID
INNER JOIN tbl_Members as d ON c.MemberID = d.MemberID
WHERE
( b.PageID = 9 AND d.MemberType = N'member' AND d.WebException = 'yes' )
OR
( b.PageID = 9 AND d.MemberType = N'member' AND d.DuesType <> 'associate' )
ORDER BY b.CategoryName, a.SubCategoryName, d.CompanyName |
|