sql server - Updating a newly added column in existing table -
i have 2 tables report rpt_id , rpt_nm columns
rpt_id rpt_nm 2345 universal 3456 field 4567 boiler 5678 northland 5789 canada and table job rpt_id column added foreign key , data below
job_nbr doc_nm rpt_id 23 field_0 null 34 boiler_2 null 45 boiler_4 null 56 canada-revised_5 null 67 universal_23 null i need update column report table on join on rpt_nm , doc_nm doc_nm not match.
update job set rpt_id=r.rpt_id report r job.doc_nm r.rpt_nm+'%'
Comments
Post a Comment