Aprenda PL/SQL

Extra table in SQL

Este forum é dedicado a códigos errados que se encontram por aí, ou seja, coisas que não se deve fazer de jeito nenhum! Não coloque neste forum dúvidas! (apenas situações bizarras do nosso dia a dia :-)
  

Poston Fri, 21 Sep 2007 5:58 pm

Below a Pearl in production:
Code: Select all
select a.rowid,
          a.nome as Area,
          a.area_id as CodArea,
          f.nopessoa as Nome,
          f.cdpessoafunc as CodNome,
          decode(a.ativo,'S','Sim','N','Não') as Ativo
   from funcionarios f, area a,
        solicitantes s
   where a.responsavel = f.cdpessoafunc
   group by a.rowid, a.nome, a.area_id, f.nopessoa, f.cdpessoafunc, a.ativo
   order by 2;
errors: * the table \"requesters\" is not used at all! Only creates a Cartesian product.
* To solve the problem, was put a GROUP BY, to eliminate the product cartesiando posted by Rodrigo Nascimento-partnership :-D
dr_gori
Location: Porto Alegre - RS

Thomas F. G
https://www.patreon.com/glufke

Poston Thu, 28 Dec 2017 3:06 pm

Topic under translation. Come back later. (This is an automatic message)
DanielNN
Location: Fortaleza - CE

att,

Daniel N.N.

Poston Thu, 04 Jan 2018 10:18 am

Topic under translation. Come back later. (This is an automatic message)
dr_gori
Location: Porto Alegre - RS

Thomas F. G
https://www.patreon.com/glufke

Poston Thu, 04 Jan 2018 10:29 am

Topic under translation. Come back later. (This is an automatic message)
DanielNN
Location: Fortaleza - CE

att,

Daniel N.N.



Return to Doubtful codes

Who is online

Users browsing this forum: No registered users and 1 guest