Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Shew Leong — — source: Informix-list mailing list archive (1991-1998)
Hi,
Can someone explain how ON EXCEPTION works in stored proc's. If you have
sample code, it would be much appreciated.
I'm trying to trap table already exist - error number -310. If the table
exist
then I want to drop it.
Here's the code I've tried (syntax is off the top of my head):
BEGIN
ON EXCEPTION IN (-310)
DROP TABLE tempMan
END EXCEPTION WITH RESUME
BEGIN
SELECT x, y, z
INTO TEMP dah
WITH NO LOG
END
END
END
Thanks
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.