A Select overrides the other SELECT

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 :-)
Post Reply
Hahu
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 147
Joined: Thu, 16 Mar 2006 11:26 am
Location: São Paulo
O mundo gira muito!!

Glufke speaks,
Good morning everyone,
Today I'm again on customer XPto..rs!
I started working and I decided to post this code :)
These two SELECTS is inside a begin ....
See

Select all

 Select x.campo_tabela ||'/diretorioA' into diretorio  
                       from tabela x 
                     where x.data = (select max(y.data)  
                                               from tabela y  
                                             where   y.data < sysdate)  
and rownum =1; 
                          
Select x.campo_tabela into diretorio  
                       from tabela x 
                     where x.data = (select max(y.data)  
                                               from tabela y  
                                             where   y.data < sysdate)  
and rownum =1; 
DAEEEE Ends With the forth ..
Here is this code ..: LOL:

May God bless everyone!
abs hahu
User avatar
Toad
Rank: DBA Pleno
Rank: DBA Pleno
Posts: 253
Joined: Fri, 18 Nov 2005 2:14 pm
Location: Seattle, WA
Contact:
Matheus Gonçalves
matheus.dev
twitter.com/developer__c

Our!!!
And I delayed to understand what selected was not selector ...
: Wink:
User avatar
dr_gori
Moderador
Moderador
Posts: 5024
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

toad wrote: Wow!
and I delayed to understand that selection was not selector ...
is right toad! I removed the "string" selected and changed to Select :-D
User avatar
Toad
Rank: DBA Pleno
Rank: DBA Pleno
Posts: 253
Joined: Fri, 18 Nov 2005 2:14 pm
Location: Seattle, WA
Contact:
Matheus Gonçalves
matheus.dev
twitter.com/developer__c

Hahahahhaa !!! Now without the "string" gets clearer!
Thanks!
[color=# dcdcdc] and ... I think it had been purposeful !! [/color]
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 11 guests