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 <[email protected]>: > 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 --- _______________________________________________ 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/cagq_jungvu42gzyrtpcqx3kgq_iksf-u6qp9ly0lolpqpxw...@mail.gmail.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.

