Standard Loaded -
Security - Edit Roles set to
Security - Add Roles set to
Security - Delete Roles set to
Standard Alternate Loaded -
Executed SQL - DECLARE @City varchar(900), @City2 varchar(900), @City3 varchar(900), @County varchar(900), @County2 varchar(900), @County3 varchar(900), @Schools varchar(900) , @Style varchar(900), @Agent varchar(900), @Firm varchar(900)
Set @City = '%' + RTRIM(Replace('[QRY-CITY]','_','-')) + '%'
Set @City2 = '%' + RTRIM(Replace('[QRY-CITY2]','_','-')) + '%'
Set @City3 = '%' + RTRIM(Replace('[QRY-CITY3]','_','-')) + '%'
Set @County = '%' + RTRIM(Replace('[QRY-COUNTY]','_','-')) + '%'
Set @County2 = '%' + RTRIM(Replace('[QRY-COUNTY2]','_','-')) + '%'
Set @County3 = '%' + RTRIM(Replace('[QRY-COUNTY3]','_','-')) + '%'
set @Schools = RTRIM(Replace('[QRY-SCHOOLS]','_','-')) + '%'
Set @Style = '%' + RTRIM(Replace('[QRY-STYLE]','_','-')) + '%'
Set @Agent = '%' + RTRIM(Replace('[QRY-AGENT]','_','-')) + '%'
Set @Firm = '%' + RTRIM(Replace('[QRY-FIRM]','_','-')) + '%'
IF @CITY = '%ANY%' OR @City = '% %' Set @City = '%%'
IF @CITY2 = '%Or City%' OR @City2 = '% %' Set @City2 = @City
IF @CITY3 = '%Or City%' OR @City3 = '% %' Set @City3 = @City
IF @COUNTY = '%ANY%' OR @County = '% %' Set @County = '%%'
IF @COUNTY2 = '%Or County%' OR @County2 = '% %' Set @County2 =@County
IF @COUNTY3 = '%Or County%' OR @County3 = '% %' Set @County3 = @County
IF @Schools = 'ANY%' OR @Schools = ' %' Set @Schools = '%%'
IF @Style = '%ANY%' Set @Style = '%%'
If @Agent = '%ANY%' Set @Agent = '%%'
If @Firm = '%ANY%' Set @Firm = '%%'
select "mls number", "price listing", "address street number", "address street direction", "address street name", "address city", "#acres - total", "school dist", "firm name", "#bedrooms", "#baths", "FriendlyPrice" from vFarms
WHERE ("price listing" BETWEEN [QRY-PRICEMIN] AND [QRY-PRICEMAX]) AND ("#bedrooms" BETWEEN [QRY-BEDROOMSMIN] AND [QRY-BEDROOMSMAX]) AND ("#baths" BETWEEN [QRY-BATHROOMSMIN] and [QRY-BATHROOMSMAX]) AND ("#sqft total (numeric)" BETWEEN [QRY-SQFTMIN] AND [QRY-SQFTMAX]) AND ("address city" LIKE @City OR"address city" LIKE @City2 OR "address city" LIKE @City3) AND ("area zone code" LIKE @County OR "area zone code" LIKE @County2 OR "area zone code" LIKE @County3) AND "school dist" LIKE @Schools And "style of home" like @Style AND AgentFullName LIKE @Agent AND REPLACE("firm name",'.','') LIKE @Firm Order By "price listing" desc
Executed SQL - select "mls number", "price listing", "address street number", "address street direction", "address street name", "address city", "#acres - total", "school dist", "firm name", "#bedrooms", "#baths", "FriendlyPrice" from vFarms
Order By "price listing" desc
Alt-SQL Loaded - Orignal SQL returned 0 records; loaded Alt-SQL instead that returned 0 records.