Apr 22, 2002 #1 georgeous Programmer Jul 11, 2001 38 GB Is it possible to update a field in one table with data from fields in another? If so, how would the syntax go: would it be UPDATE stuff set fileid = (the field from the file table) where stuffid = ....... any help would be appreciated thanks in advance
Is it possible to update a field in one table with data from fields in another? If so, how would the syntax go: would it be UPDATE stuff set fileid = (the field from the file table) where stuffid = ....... any help would be appreciated thanks in advance
Apr 22, 2002 1 #2 bperry Programmer Jul 27, 2001 1,033 CA something like this: Update Mytable m SET col1=0.fielda, col2=0.fieldb from Mytable m Inner Join OtherTable o on m.CommonColumn = o.CommonColumn Upvote 0 Downvote
something like this: Update Mytable m SET col1=0.fielda, col2=0.fieldb from Mytable m Inner Join OtherTable o on m.CommonColumn = o.CommonColumn
Apr 22, 2002 #3 bperry Programmer Jul 27, 2001 1,033 CA I forgot you wanted a Where clause. (But it's easy to see where it would go.) Update Mytable m SET col1=o.fielda, col2=o.fieldb from Mytable m Inner Join OtherTable o ON m.CommonColumn = o.CommonColumn Where blah blah blah Upvote 0 Downvote
I forgot you wanted a Where clause. (But it's easy to see where it would go.) Update Mytable m SET col1=o.fielda, col2=o.fieldb from Mytable m Inner Join OtherTable o ON m.CommonColumn = o.CommonColumn Where blah blah blah