SELECT rollID
FROM [dbo].[dbo_Roll] a
INNER JOIN [evt_Building Permits] b
ON LEFT(a.rollnumber, LEN(a.rollnumber)-4) = b.rollnumber COLLATE DATABASE_DEFAULT
And I want to update the result to this table [evt_Building Permits].roll_id = [dbo].[dbo_Roll].rollID?
How can I attain this?