Lin:
Have you looked at the UPDATE command? You can update values in a table based on a link to another table using essentially the same syntax as a SELECT command. Example: UPDATE reject SET src_unit = t2.src_unit FROM reject t1, prodmast t2 WHERE t1.commonkey = t2.commonkey Or UPDATE reject SET src_unit = <some value> WHERE commonkey IN (SELECT commonkey FROM prodmast WHERE . . . .) Either one of these example should work quite well if I'm correctly understanding what you want to do. Check out the UPDATE syntax in R:BASE Help. Hope that helps. Mike Ramsour AK Steel Coshocton Works Quality Department Phone/VMS: 740-829-4340 _____ From: Lin MacDonald [mailto:[EMAIL PROTECTED] Sent: Monday, October 06, 2008 12:07 PM To: [email protected] Subject: [RBASE-L] - changing values using 'Declare Cursor'? I have 2 tables. They share a key. I need to change the value of a column in Table2 depending if a row with that key exists in Table1. I was thinking to use Declare Cursor, with a Fetch in a While loop, but in the back of my brain I seem to remember reading that that was no longer the best way to do it?? Maybe just my imagination but I thought I would ask, just in case a better method existed, Lin

