Re: Exception Handling in Stored Proc's
Posted in 1998
Topics: SQL Development & Query Writing
Hey Art,
Do you remember if it was with version 7.2.3 ?
It's kind of ironic that this is bug. I've been put on this project to write
these reports using Crystal Reports based on a 3rd parties DB. It's been
nothing but bugs. After testing one report I found that Crystal doesn't
support left outer joins properly when there are table dependancies. For
exmple:
Crystal creates the following syntax:
SELECT a.a, b.b, c.c
FROM a a, OUTER b b, c c
The actual sql should be
SELECT a.a, b.b, c.c
FROM a a, OUTER (b b, c c)
There IS NO work around, if you modify the sql, Crystal crashes and burns.
Management has this notion that everything can be done in Crystal. When I
tried this as one SELECT statement with approx. 40 tables, the Sun box and
Informix came to it's knees. When it was done after 5 minutes, there was
enough network traffic to choke a horse.
Anyway, everyone planning to use Crystal - BEWARE !!
Shew
Art S. Kagel wrote in message <3641E5E5.581@bloomberg.net>...
>Shew Leong wrote:
>>
>> Hi Octav,
>>
>> I tried what you suggested and it worked the 1st time but on the 2nd try.
>> Informix errored out with table is not in the database. I guess what it
did
>> was try to drop the table even it was error -310.
>>
>> I went through the manual again and tried:
>>
>> BEGIN
>> ON EXCEPTION IN (-310) SET err_num
>> IF err_num = -310 THEN
>> DROP TABLE dah;>> END IF
>>
>> SELECT ....>>
>> END
>
>I ran into this one last year and reported it as a bug. I do not
>remember the bug number. The workaround, as Thomas suggested, is to
>reverse the logic. Drop the temp table at the top of the procedure
>and trap and ignore the "table not found" error rather than trying to
>recover from the "table already exists" error.
>
>Art S. Kagel