In a similar vain. I know that Tally gets updated After something
occurs. But, in that code - there was No Code before it to show What the
Tally was based upon - so its hard to say What the code would do...
-K-
On 7/29/2014 6:52 PM, Fernando D. Bozzo wrote:
Hi Sytze:
You can't use _tally this way. You are assuming too much using like this,
and this system variable is updated with every VFP command that operates on
records, as Select-SQL, REPLACE, UPDATE, and the like.
In your example, _tally is updated *after* REPLACE is executed with the
number of records affected, but can be affected also with the Select-SQL at
the same time.
You didn't mention what the error is, but you can't use a Select-SQL as a
function or expression, because it is a command. You should decompose this,
may be using this Select-SQL inside a function, but the _tally behaviour
can be erratic in this use case.
Best regards.-
2014-07-30 0:22 GMT+02:00 Sytze de Boer <[email protected]>:
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))
--
Kind regards,
Sytze de Boer
Kiss Software
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
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/[email protected]
** 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.