Update with Inner Join SQL Server

Problem

 

I have two tables (table1 and table2). I want to set a flag in table1 for
each common row with table2. I

 

 

Solution:

 

Update

iwf_requestdetails

set

LastUpdatedStatus=f.Status_ID

from

iwf_requestdetails i innerjoin [FinalWorkflowDetails1] f

on

i.[FormNo] = f.[FORM_NO]

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: