I have an issue with my update SQL.
Table A is existing EMPLOYEES table with 10000+ records.
Table B is a EMPTEMP table where I have loaded all the information for the employees I need to update (only about 1161 records).
My SQL Update statement:
Update employees em SET (lname, startdate, enddate, emercontact) = (select lname, startdate, enddate, emergency_contact from emptemp et where em.emplid = et.employeeid)
That sql will update all 10000+ records and make all other records and fields NULL besides the 1161 records.
My question is what am I doing wrong?
thank you
noob
Table A is existing EMPLOYEES table with 10000+ records.
Table B is a EMPTEMP table where I have loaded all the information for the employees I need to update (only about 1161 records).
My SQL Update statement:
Update employees em SET (lname, startdate, enddate, emercontact) = (select lname, startdate, enddate, emergency_contact from emptemp et where em.emplid = et.employeeid)
That sql will update all 10000+ records and make all other records and fields NULL besides the 1161 records.
My question is what am I doing wrong?
thank you
noob