I have two tables, Tbl_M is a master table, and Tbl_T is a transaction table.
Master table (Tbl_M) has following fields: empid, name, phonenum, fld_a, fld_b, etc
Transaction table (Tbl_T)has following fields: empid, name, phonenum, fld_x.
How would I get name, phone number for each empid from master to transaction table.
The following doesn’t work:
Update Tbl_T
Set Tbl_T.name = Tbl_M.name,
Tbl_T.phonenum = Tbl_M.phonenum
Where Tbl_T.empid = Tbl_M.empid
Any suggestion?
I know I can do it in a procedure by creating a cursor of all records on transaction table and then reading and updating it with matching records from master file.
Can I do it without procedure?
Master table (Tbl_M) has following fields: empid, name, phonenum, fld_a, fld_b, etc
Transaction table (Tbl_T)has following fields: empid, name, phonenum, fld_x.
How would I get name, phone number for each empid from master to transaction table.
The following doesn’t work:
Update Tbl_T
Set Tbl_T.name = Tbl_M.name,
Tbl_T.phonenum = Tbl_M.phonenum
Where Tbl_T.empid = Tbl_M.empid
Any suggestion?
I know I can do it in a procedure by creating a cursor of all records on transaction table and then reading and updating it with matching records from master file.
Can I do it without procedure?