select ad_number ad_number from real_ad where newflag = 1 and show =1 and (PRICE < 999999999 AND price > 20) and bedrooms < 9000 and bathrooms < 9000 and product_id = #pid# and (class_code in ('apart','condo','home','homec','house','landc','multi') or class_code in ( SELECT class_code FROM cls.webdir WHERE Product_id = #pid# AND class_code is not null AND class_group in (select class_group from cls.webdir where export_gabriels = 1) ) ) Total ads: #ads.recordcount#
  • #test# - #ad_number_list#
    Query:select ad_number, substr(ad255,1,#it#) adsum from #request.tbl# WHERE ad_number in (#ad_number_list#)
    Ad numbers: #ad_number_list#
    SELECT ad_number, url, atex_ad_number, bedrooms/100 bedrooms, bathrooms/100 bathrooms, price, address1, ad255, ad_type FROM #request.tbl# WHERE ad_number in (#ad_number_list#)