At 21:40 +0200 12/18/02, Gelu Gogancea wrote:
>You can use REPLACE...SELECT
Not in the case described below. You cannot replace into the same
table from which you're selecting.
>G.NET SOFTWARE COMPANY
>Permanent e-mail address : gg@stripped
>----- Original Message -----
>From: "Jeff Snoxell" <Jeff@stripped>
>Sent: Wednesday, December 18, 2002 7:56 PM
>Subject: SELECT and UPDATE at the same time?
>> Hello again,
>> I'm selecting a group of records from my database. I then loop through the
>> selected records and do some work based on what I find. But what I also
>> want to do as I interrogate each record is update some of its fields with
>> new values... but won't that screw up the outer loop? I mean if I try to
>> execute a query whilst looping around the result set of a former query
>> I not screw up my result set that I'm looping through?
>> Also, is it possible to update specific fields of certain records within a
>> SELECT query? ie can I do something like this:
>> SELECT * FROM my_table WHERE Age > 50 AND UPDATE Status = "OLD"
> > Jeff