Informix ISQL problem (fwd)
Posted in 1994
brian,
informix doesnt allow cascade deletes just yet. you can do the following:
select part_link
from parts
where <where clause>
into temp t1;
delete from parts
where part_link in (select * from t1);
delete from part_cnt
where part_link in (select * from t1);
Forwarded message:
> From ilist@rmy.emory.edu Thu Mar 24 09:08:27 1994
> From: brianr@magnus1.com (Bulletin board login)
> Message-Id: <Cn4Gv9.82F@magnus1.com>
> Subject: Informix ISQL problem
> Date: Wed, 23 Mar 1994 14:42:44 GMT
> Reply-To: brianr@magnus1.com (Bulletin board login)
> Organization: Magnus Online
> Sender: informix-list-owner@rmy.emory.edu
> To: informix-list@rmy.emory.edu
> X-Informix-List-To: inf_bb@hermes1.sps.mot.com
> X-Informix-List-Id: <news.6010>
>
> Hello everyone, I am having a slight problem with two linked tables. I have an
> parts table and a partscount table and I need to delete a large number of parts
> from using a parameter in a single field. This part works fine exept that the
> partscount table needs to be updated as well. I can't seem to find the commands
> to coordinate the deletion of the parts and the actual parts count in the other
> table. They are both linked by a field called part_link, I just don't know of a
> way to do a delete on two table at once. I wasn't able to select both for a
> delete at the same time. Oh, and the parameter that I am using for the delete
> is only found in the parts table and not in the partscount table.
>
> So, if anyone has any suggestions, It would be greatly appreciated.
>
> Thanks in advance,
>
> Brian
>
> brianr@magnus1.com
>
>
--
regards,
+----------------------------------------------------------------------------+
| . . | |
| ... ... | Bob Baskett |
| ..... ..... | Software Engineer, DBA |
| .. ... .. | Business Systems Integration Group |
| . . . | Semiconductor Products Sector |
| | Mesa, AZ |
| Motorola, Inc. | |
|----------------------------------------------------------------------------|
| 'connectionLESS IS MORE' -- Data Broker |
|----------------------------------------------------------------------------|
| Duct tape is like the force. It has a light side, and a dark side, and |
| it holds the universe together ... |
| -- Carl Zwanzig |
+----------------------------------------------------------------------------+