View Single Post
  #6 (permalink)  
Old June 21st, 2017, 01:38 PM
samanthatucker samanthatucker is offline
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2017
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Please help ORDER BY issue

When I add ORDER BY deals.DEAL_ID before LIMIT the page times out and never loads. It works perfect without it. Please HELP !!!!

Set ors = oConn.Execute("SELECT deals.DEAL_ID, deals.EMP_ID, users.fname AS empfname, users.lname AS emplname, users.usrcomm AS empdesc, deals.CLOSER_ID, userz.fname AS clsrfname, userz.usrcomm AS clsrdesc, userz.lname AS clsrlname, deals.split_comm, deals.EMP_LOC, deals.DEAL_DATE, deals.fname, deals.midname, deals.spfname, deals.splname, deals.lname, deals.address1, deals.address2,, deals.state, deals.zipcode, deals.phone1, deals.phone2, deals.email_addy, deals.pmnt_type, deals.cc_name, deals.card1, deals.card2, deals.card3, deals.card4, deals.card_exp_mo, deals.card_exp_yr, deals.cid_id, deals.bank_name, deals.check_numb, deals.route_numb, deals.acct_numb, deals.app_code, deals.deal_amt, deals.processthru, deals.resortcomp, deals.pkgname, deals.pri_location, deals.tripdetail, deals.pkgcost, deals.rmtype, deals.gift1, deals.gift2, deals.gift3, deals.gift4, deals.gift5, deals.gift6, deals.deal_status, deals.assigned_to AS prev_status, deals.CONF_PREFIX AS conf_code, deals.verify_date, users_1.UID AS verifid, users_1.fname AS vfname, users_1.lname AS vlname, deals.pmnt_date, deals.shdate, deals.cancel_date, deals.cancel_wk, deals.payroll_wk, deals.chargeback_wk, deals.mgr_cb_wk, deals.clsr_cb_wk, deals.pay_amt, deals.clsr_amt, deals.mgr, userz_1.fname AS mgrfname, userz_1.lname AS mgrlname, deals.go_green, deals.mail_sent, deals.deal_printed, deals.deal_issue, deals.wk_tag, deals.mnth_tag, deals.yr_tag, deals.deal_time, deals.vartime, deals.payshift, deals.dfield1, userz_2.fname AS hbfname, userz_2.lname AS hblname, deals.dfield2, deals.dfield3, deals.dfield4, deals.flagit, deals.source FROM ((((deals LEFT JOIN userz ON deals.CLOSER_ID = userz.UID) LEFT JOIN userz AS userz_1 ON deals.mgr = userz_1.UID) LEFT JOIN userz AS userz_2 ON deals.dfield1 = userz_2.UID) LEFT JOIN users AS users_1 ON deals.varifid = users_1.UID) LEFT JOIN users ON deals.EMP_ID = users.UID WHERE (((deals.deal_status) <> 'Delete')) LIMIT " & Session("pgsz") & "")
Reply With Quote