On Wed, 2002-03-20 at 22:55, Zabach, Elke wrote:
> Mark Wong wrote:
> 
> > I have a script to create foreign keys that is failing (ERR
> > -24988,ERR_SQL: sql error 350,Referential integrity violated) and I'm
> > trying to read a trace to determine what exactly is violated.  So I'm
> > having trouble deciphering what the trace says when the error is
> > thrown.  Can anyone offer some tips or a translation?
> 
> Do not try to read vtrace. For kernel developer, this is ok, but not for
> usual application developers.
> But if there are error 350,Referential integrity violated, try this:
> 
> imagine you want to create a referential contraint in 
> table treferencing (column1, column2) references treferenced (colA, colB)
> 
> then do a
> 
> select column1, column2 from treferencing
> where (column1, column2) <> ALL (select colA, colB from treferenced)
> 
> (or add in the first select-list some other columns helping to find the
> key of those records)
> 
> Then you should see those records violating the referential constraint
> you want to create
> 
> Elke
> SAP Labs Berlin
> 
> _______________________________________________
> sapdb.general mailing list
> [EMAIL PROTECTED]
> http://listserv.sap.com/mailman/listinfo/sapdb.general

Yeah, I get no rows returned.  Similarly (I think) I attempted something
like:

select column1 from treferencing where column1 not in (select colA from
treferenced)

So I'm a little confused...  Anything else I can try?

Thanks,
Mark

_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to