Thanks everyone for all the options. I'm definately archiving this thread in my Gmail!
-Frank On Fri, 21 Jan 2005 07:27:20 -0600, Deanna Schneider <[EMAIL PROTECTED]> wrote: > Why didn't you just do this, then? > UPDATE TABLE1 > SET TABLE1.FIELD = > ( > SELECT > TABLE2.FIELD > FROM TABLE2 > WHERE TABLE1.KEY = TABLE2.KEY > AND TABLE1.FIELD = 'Y' > ) > > (You don't need the outer table in your inner query.) > > ----- Original Message ----- > From: "Frank Mamone" <[EMAIL PROTECTED]> > To: "CF-Talk" <[email protected]> > Sent: Thursday, January 20, 2005 6:28 PM > Subject: Re: Oracle help please > > >I was trying to run an update with a self-join. The table has no > > primary key attributes. It's a an interface table for data migration. > > Here is one variation: > > > > UPDATE TABLE1 > > SET TABLE1.FIELD = > > ( > > SELECT > > TABLE2.FIELD > > FROM TABLE1, TABLE2 > > WHERE TABLE1.KEY = TABLE2.KEY > > AND TABLE1.FIELD = 'Y' > > ) > > > > I was just wondering if my interpretation of the error was correct. > > Note that non-join updates > > work without error. > > > > - Frank > > > > On Thu, 20 Jan 2005 22:16:45 -0000, Ciliotta, Mario > > <[EMAIL PROTECTED]> wrote: > >> Frank, > >> > >> What is the exact SQL that you are now trying to run? > >> > >> Mario > >> > >> -----Original Message----- > >> From: Jochem van Dieten [mailto:[EMAIL PROTECTED] > >> Sent: Thursday, January 20, 2005 4:42 PM > >> To: CF-Talk > >> Subject: Re: Oracle help please > >> > >> Frank Mamone wrote: > >> > > >> > With everyone's help I finally did get the syntax working but I get the > >> famous > >> > 'non-preserved key' message. I finally did it by updating the > >> > majority doing a straight update and processing the exceptions > >> > manually. > >> > > >> > I was just wondering if you can enlighten me on the meaning of the > >> > message -- if you are familiar with it. From what I read, both tables > >> > being joined must both have primary keys defined. Do they mean defined > >> > as physical attributes of the tables? > >> > >> I am not familiar with that error. > >> > >> Jochem > >> > >> > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware: a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191343 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

