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

Re: Query bug

2011-07-24 Thread Velen Vydelingum
- From: Johnny Withers joh...@pixelated.net To: Velen Vydelingum ve...@biz-mu.com Cc: mysql@lists.mysql.com Sent: Sunday, July 24, 2011 17:41 Subject: Re: Query bug What's your vb code for outputting the results look like? On Jul 24, 2011 8:22 AM, Velen Vydelingum ve...@biz-mu.com wrote: Hi

rebuilding table

2011-07-23 Thread Velen Vydelingum
Hi, I have 2 tables and need to create a 3rd one as follows: Table Sales: Code Price sQtysDate 12312.0022011-03-12 19010.0012011-03-14 12313.0022011-03-29 12313.0032011-03-31 19011.0022011-03-31 Table Costs

Query

2011-07-16 Thread Velen Vydelingum
Hi, I have 2 tables: Sales Code, Price, sDate HistoryCode, Cost, hDate The sales record sales for each product by its code. The History table has the cost history of each product at different date. I need to know the last cost of each product in the sales table at the date of the sales. Can