Q&A about the site for power users of web applications
-- List of Users in Cambodia SELECT Top ##Top## ROW_NUMBER() OVER(ORDER BY Reputation DESC) AS [# by Rep], Id AS [User Link], Reputation, Location, --CreationDate, LastAccessDate, UpVotes, DownVotes FROM Users WHERE ( lower(Location) LIKE lower('%Cambodia%') -- http://sustainablesources.com/resources/country-abbreviations/ or UPPER(RIGHT(RTRIM(Location), 3)) = ' KH' or UPPER(RIGHT(RTRIM(Location), 3)) = ',KH' or UPPER(Location) = 'KH' or lower(Location) LIKE lower('%Kampot%') or lower(Location) LIKE lower('%Phnom Penh%') ) -- exclusions and not ( lower(Location) LIKE lower('%dummy%') --for testing --or lower(Location) = lower('Cambodia') --or lower(Location) like lower('%, Cambodia') ) and LEN(Location) > 1 --and Reputation > 1 --Temporarily sort by location to more easily pick out false positive entries --ORDER BY Location ASC;