Re: Transferring information from a field in one table to a field in another table using informix-sql
Posted in 1996
I suspect you're close. Try something like: UPDATE addemp SET setteyr1 = (SELECT tearn_y FROM wrkemployee WHERE wrkemployee.taxyr = 1995 AND wrkemployee.empl_no = addemp.empl_no); --Craig On Mon, 22 Apr 1996 16:48:41 GMT, marcia.smith@m.k12.ut.us (Marcia Laird Smith) wrote: >I need to transfer info from a field in one table to a field in >another table in the same database without problems using informix-sql >version 4.0 > >I ran the following program code and it didn't work!! > >begin work; >lock table addemp in share mode; >update addemp >setteyr1 = (select tearn_y from wrkemployee where taxyr = 1995) >where addemp.empl_no = wrkemployee.empl_no > ====================================================================== Craig Kickel | Unix/C/Database Consultant ckickel@cyberhighway.net | <This space intentionally left blank> ======================================================================