N.B Untested:
UPDATE stocks SET timesheets = (select sum(qty) from tsheets WHERE
stocks.stCode = tsheetsum.stCode)
* if there is only one timesheet per stcode you could omit the sum()
- which would avoid using a correlated subquery iirc
_______________________________________________
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/54b0b7a9.4090...@hawthorncottage.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.