sql - Query to update records from two different tables -
I have a question that updates the table record. I want to update the record when the customer is not present. I will want to look up to: ..? How can I do an SQL query that thanks a lot
update #TEMP set [fld_LastName] = CustomerProfile.fld_ListName, fld_FirstName = CustomerProfile.fland_first_name, fld_BirthDate = CustomerProfile.fold_birthDate FROM [DB_1]. [Dbo]. Customer profile as [Tbl_Customer] - C WHERE Customer Profile. Floor_CustomNo = # TEMP.fld_CustomerNo
[DB_1] [dbo] [tbl_Customer]
[DB_2] [dbo] [tbl_Customer]
This should work for you.
update b set [fld_LastName] = CustomerProfile.fld_LastName, fld_FirstName = CustomerProfile.fld_FirstName, fld_BirthDate = CustomerProfile.fld_BirthDate [DB_1]. [Dbo]. [Tbl_Customer] Custome as RProfile INNER JOIN #TEMP Customer on profile.fland_CustomerNo is not a buffalo customer where B [fld_ListName] is IS Null or BFL_FRIST name or B.Field_BirthDate IS NULL
< / Div>
Comments
Post a Comment