Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 29th, 2012  |  syntax: None  |  size: 0.28 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Using a query to update existing records.
  2. update t1 set t1.timefield = s2.AvgOfTIME
  3. from yourtable t1
  4. inner join
  5. (
  6.   -- you query for calculating avg time
  7. )
  8. as t2
  9. on t1.Process1 = t2.Process1 and t1.Week2 = t2.Week2 and t1.Operator3 = t2.Operator3 and       t1.Shift4 = t2.Shift4