0

I have two files that I have been working with, IMSTKPF (Primary) and QQRYOUT. IMSTKPF file has a field called Price I am attempting to do a Join to theses to files to pull the value from the field TOTAL2 in the QQRYOUT file and update the PRICE field in THE IMSTKPF file.

I can’t seem to make this work. I update files all the time using the same method I have just never had to update every row of a file using Join criteria. Any guidance and help would be appreciated

update qday.IMSTKPF as v1
set v1.PRICE =
      (select v2.TOTAL2
       from QDAY.QQRYOUT as v2
       where v2.ARCSTK# = v1.STKPRT)
Igor
  • 58,317
  • 10
  • 91
  • 160
  • 1
    Does this answer your question? [How can I do an UPDATE statement with JOIN in SQL Server?](https://stackoverflow.com/questions/1293330/how-can-i-do-an-update-statement-with-join-in-sql-server) – Igor Nov 22 '21 at 22:03

0 Answers0