Robert Kr�ger wrote: > Hi, > > I have a strange behaviour when issuing selects on a view > (don't know if has > something to do with views, though). seemingly randomly I get > duplicate key > exceptions as shown below from time to time without any > change in the data. > The (java) code issues several selects on the same view within one > transaction. maybe this is also relevant. > > SAP DBTech SQL: [200] Duplicate key > > could it be that something is wrong with the handling of > temporary tables in > the current version of sapdb? Today's posting by Vitor > Varalonga looks like a > similar problem. > > version is X32|LINUX 7.3.0 Build 025-000-085-912 > > is there some more information from logfiles I can provide? > > Thanks in advance, > > Robert
After some mailing and sending some log-files out of the mailing-list it was found out, that the problem is the combination of select in the from-clause of another select plus the usage of a complex view, for example: create view vcomplex as select distinct ta.a2 from ta,tb where ta.a1 = tb.b1 ( because of the DISTINCT the view is a complex view, see: http://www.sapdb.org/htmhelp/c7/12ffd406ab11d3a97d00a0c9449261/frameset.htm ) and some from-select (select in the from-clause) using such a complex-view, for example: SELECT * FROM tc, (SELECT * FROM TB, vcomplex) fromsel where ... Then an intermediate info is not destroyed where it should have been destroyed and another poor statement will find out that this special info is on disk and in cache unexpectedly. Therefore the statement finding this is not guilty (making it a little more complicate to find the reason of the behaviour) but is the victim. Until bug-fixing one has to avoid this combination, perhaps by using a from-select in the final select instead of the complex view or changing the complex view to a NON-complex-view. Other hints given before are not true any more. Thank you for reporting (and trying such fine combination) and sorry for the inconvenience. Elke SAP Labs Berlin _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
