Sytze - as your Last test pointed out - you found speed improvements by testing. I too have done the same - testing different code for which had the better time. I suggest same goes with current questions as to which is better! Test and may the Best Code Win!

:-)
-K-


On 7/29/2014 8:06 PM, Sytze de Boer wrote:
Everyone, thank you for your help.
My old routine took point 419 seconds, the new routine point 350

This leads to my next question
Which of the two methods is *better* (i.e. used by experts)
1  Update, set etc
2  Scan/endscan with replace
3  set a relation and replace all

By *better*, I'm referring to speed and record/file locking.







On Wed, Jul 30, 2014 at 11:46 AM, Fernando D. Bozzo <fdbo...@gmail.com>
wrote:

If this doesn't work, you can add a condition for "AND NOT NULL qty" in the
Select-SQL




2014-07-30 1:45 GMT+02:00 Fernando D. Bozzo <fdbo...@gmail.com>:

In this case, something like this:

UPDATE stocktable SET qty = ( select SUM( *NVL(qty,0)* ) as ttl FROM
invtable where invtable.stockcode=stocktable.code )

I'm not sure if I'm using NVL apropiately in this case (because of the
SUM
function), but NVL() is the function to intercept NULLs and convert to 0
or
any value you want.



2014-07-30 1:41 GMT+02:00 Sytze de Boer <sytze.k...@gmail.com>:

Fernando, this is really helpful, but I'm stuck on the .NULL. matter.
i.e. I get the error message, field Qty does not accept null values





--- StripMime Report -- processed MIME parts ---
multipart/alternative
   text/plain (text body -- kept)
   text/html
---

[excessive quoting removed by server]

_______________________________________________
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/53d85a94.3000...@optonline.net
** 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.

Reply via email to