Sytze de Boer wrote on 2014-07-29: > Friends > Can someone point out me error here please > > select stocktable > REPLACE ALL qty WITH IIF(_tally>0,select SUM(qty) as ttl,stockcode FROM > invtable where stockcode=stocktable.code,ttl,0))
Sytze, Seems odd to have a select statement in the middle of a replace statement. You might need to SCAN/ENDSCAN the stocktable and update each row individually. Tracy Pearson PowerChurch Software _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/000901cfab7f$9af22330$d0d66990$@powerchurch.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.