can't delete!!
Posted in 1998
Hey y'all... having a problem with my Informix. Still being new to this, I'm
trying to figure this out on my own and I give up. Y'all have been so helpful
in the past, I thought I'd try you again.
I'm trying to delete anything from all of our tables that has a switch_id =
"2JB". Here's what I've come up with:
First I get a list of tables in the database that have "switch_id" as a
colname:
select unique tabname from systables a, syscolumns b where a.tabid =b.tabid and b.colname = "switch_id"
And I put that in a for loop looking for switch_id = "2JB"
It ain't working, so I just have it display the table that has it in it, and
it shows one table, "switches".
I try:
delete from switches where switch_id = "2JB"
and I get:
692: Key value for constraint (informix.switches_key) is still beingreferenced.
This switch_id is not in any other table in my database. Any ideas?
Thanks in advance for your generous help!!
Joseph
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum