UPDATE stocks SET timesheets = 0
UPDATE stocks SET timesheets = tsheets.qty FROM tsheets WHERE stocks.stCode
= tsheets.stCode

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Sytze de
Boer
Sent: Saturday, 10 January 2015 8:43 AM
To: profoxt...@leafe.com
Subject: Help with update

Friends
I know this code stinks and I'm sure there's a much better way with UPDATE,
but I can't figure it out.

sele stocks
repla all timesheets with 0

sele tsheets
go top
scan
   sele stocks
   seek tsheets.stcode
   replace timesheets with timesheets+tsheets.qty
   sele tsheets
endscan

Can anyone help with this ?


--
Kind regards,
Sytze de Boer


--- 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/001201d02c56$80a68270$81f38750$@ozemail.com.au
** 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