Hi!
 

    Something really strange is happening when I try to run a specific
query: first time it works, second time not, works, works not, and so
on, and so on...
The query is the following:

SELECT C.conteudo_id, C.activo, C.data, C.titulo, C.descricao, C.ficheiro, T.titulo AS tipo_conteudo, T.ficheiro_icone, S.seccao_id, S.titulo AS seccao, P.visto
 FROM Conteudo C, Tipo_Conteudo T, Rel_Seccao_Conteudo R, Seccao S,
  (select p1.conteudo_id, count(p1.login_id) AS visto from Perfil p1 where (p1.operacao_id = 2 AND p1.login_id=1000) group by p1.conteudo_id) P
WHERE
 C.tipo_conteudo_id = T.tipo_conteudo_id AND
 C.conteudo_id = R.conteudo_id AND
 R.seccao_id (+)= S.seccao_id AND
 P.Conteudo_id (+)= C.conteudo_id AND
 S.modulo_id = 1072
 AND (R.dest_all = 1 OR C.conteudo_id IN
  (SELECT RCL.conteudo_id FROM Rel_Conteudo_Login RCL, Seccao SC
   WHERE
    RCL.seccao_id = SC.seccao_id AND
 RCL.login_id = 1000 AND
 SC.modulo_id = 1072))
 ORDER BY C.titulo
 

    On this strange alternate behaviour, whenever the query fails to
execute properly I get the following error:

Native error: -6000

Text:  [SAP AG][SQLOD32 DLL][SAP DB]Base table or view already exists;-6000 POS(1) Duplicate table name.
 

Can anyone enlighten me on this?
 

kind regards,

Vitor Varalonga

Reply via email to