[freeside-commits] freeside/bin select-cust-desync_bill_dates.sql, NONE, 1.1

Ivan,,, ivan at wavetail.420.am
Wed Aug 25 16:15:32 PDT 2010


Update of /home/cvs/cvsroot/freeside/bin
In directory wavetail.420.am:/tmp/cvs-serv2974

Added Files:
	select-cust-desync_bill_dates.sql 
Log Message:
quick query on desynced bill dates, RT#9733

--- NEW FILE: select-cust-desync_bill_dates.sql ---
SELECT DISTINCT custnum, agent_custid, first, last, company
 FROM cust_pkg LEFT JOIN cust_main USING ( custnum )
 WHERE cancel IS NULL AND 0 < (
   SELECT COUNT(*) FROM cust_pkg AS others
    WHERE cust_pkg.custnum = others.custnum
      AND cust_pkg.pkgnum != others.pkgnum
      AND cust_pkg.bill != others.bill
      AND others.cancel IS NULL
 );



More information about the freeside-commits mailing list