I'm currently with a problem with DISTINCT clause, tried with SAPDB 7.4 and MaxSB 7.5.00.03 in Windows 2000 SP4. The following query gives me the error "Base table or view already exists;-6000 POS(1) Duplicate table name.". If I remove the DISTINCT clause or the DECODE function, it works ok. Is there some limitation with DISTINCT and DECODE function, when they are used in the same query?
select distinct recurso4_.id as id, decode (recurso4_.id, recurso4__1.id, 1,0 ) as clazz_, recurso4_.usuario_id as usuario_id20_, recurso4_.publicacao as publicacao20_, recurso4_.titulo as titulo20_ from permissao permissa0_, turma turma1_, entidade turma1__1, professor_turma professo2_, professor professo3_, recurso recurso4_, agenda recurso4__1 where turma1_.id=turma1__1.id and turma1_.id=professo2_.turma_id and professo2_.professor_id=professo3_.id and permissa0_.recurso_id=recurso4_.id and recurso4_.id=recurso4__1.id(+) and ((permissa0_.entidade_id=turma1_.id )and(professo3_.usuario_id=1 ))
Thanks, Robson Paniago
----
_________________________________________________________________ MSN Hotmail, o maior webmail do Brasil. http://www.hotmail.com
-- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
