Re: Query bug

2011-07-24 Thread Velen Vydelingum
It's something like : conn.execute ("insert into tmptable select supplier_code,0,0,0,0,0-sum(amountpaid),0 from custpayments where paymentdate<='2010-12-02' and grnno not in (Select sale_id from saletrans_cons where paymode='Credit') group by supplier_code") Veln - Original Message -

Re: Query bug

2011-07-24 Thread Johnny Withers
What's your vb code for outputting the results look like? On Jul 24, 2011 8:22 AM, "Velen Vydelingum" wrote: Hi, I have the following query which is fine when I run it from the mysql shell screen: select supplier_code,0,0,0,0,0-sum(amountpaid),0 from custpayments where paymentdate<='2010-12-0

Query bug

2011-07-24 Thread Velen Vydelingum
Hi, I have the following query which is fine when I run it from the mysql shell screen: select supplier_code,0,0,0,0,0-sum(amountpaid),0 from custpayments where paymentdate<='2010-12-02' and grnno not in (Select sale_id from saletrans_cons where paymode='Credit') group by supplier_code but w