On Thu, Nov 11, 2004 at 08:13:16AM +0100, Bjoern Platzen wrote:
> insert into "T_OEPNV_HST_LIN" ("HST_NR", "LIN_U_NAME", "LIN_KAT",
> "LIN_NAME_O", "LIN_NAME_I") values ('10001', 'Stadtwerke Marburg GmbH',
> 'Bus', 'C', '11103');
> does not work while
> select * from "T_OEPNV_HST" where "HST_NR"='10001';
> returns
> HST_ID | HST_NR | HST_NAME | HST_COORD
> --------+--------+----------+------------------------------------------
> 23555 | 10001 | Aff?ller | SRID=31467;POINT(3483856.148 5632168.48)
> (1 Zeile)
The foreign key constraint on T_OEPNV_HST_LIN.HST_NR references the
wrong field in T_OEPNV_HST. Since you didn't specify a field, it's
referencing the primary key HST_ID instead of HST_NR.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/