I run into a problem in SQL, I don't know how to update table A by replacing its column "Edu" with another column "Level" of table B.
- Two tables have a relationship in column "Edu"
- Different data types bt "Edu" (number) & "Level" (Short Text) Can anyone explain why the below code does not work? And kindly suggest a solution. Thanks!
UPDATE A SET A.Edu= CAST(B.Level AS Varchar(Max)) FROM A INNER JOIN B ON A.Edu=B.Edu;