Re: INSERT with zero SELECT (fwd)
Posted in 1991
Topics: Error Codes & Troubleshooting
> I think one could be deemed more correct than the other if it > were closer to compliance with the ANSI SQL standard than the > other. Off hand, I'm not sure whether the standard specifies > behavior of SQL_NOTFOUND, but I think it's a safe guess that > this has been left to the vendor's imagination, as have many > aspects of SQL, and that these two vendor's differ slightly > on this point. Actually, this is one of the cases where the standard is quite clear. Both the '86 and '89 versions require three cases to be distinguished in SQL code: the error case, the not found case, and the normal case. How these are encoded is up to the implementor (who can therefore distinguish lots of subcases if he wants to, which usually does happen for the error case) but it must be possible to determine from inspection of sqlcode which of these three cases one is in. So one vendor is non-conformant on this point. (As both vendors are noncomformant on rather a lot of other points, this one point doesn't mean that one is overall more conformant than the other). Tom Thomson [tom@fiveg.icl.co.uk