Will the billing run?

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
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

Observe the code below in a billing routine, and see if the 3 errors are discovered in this small IF:

Select all

-- Se Empresa Matriz e Forma de Cobrança Filial 
if (nvl(ln_cd_proposta_matriz, null) is null)        and (lv_forma_cobranca = 'F') then 
   pr_insere_tb_faturamento; 
   lb_existe_fatura_filial := true; 
   ln_nu_faturados := ln_nu_faturados + 1; 
-- Se Empresa Filial e Forma de Cobrança Filial 
elsif (nvl(ln_cd_proposta_matriz, null) is not null) and (lv_forma_cobranca = 'F') then 
   pr_insere_tb_faturamento; 
   lb_existe_fatura_filial := true; 
   ln_nu_faturados := ln_nu_faturados + 1; 
end if;
1. NVL (Field, NULL) - Total absurd! (2 times!)
2. Both the IF and Elsif do the same thing! (Why have Elsif?)

Now tell me if with code of this level the billing will go out at the end of the right ... :-d
goper
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 4
Joined: Sat, 23 Sep 2006 11:53 am
Location: Novo Hamburgo/RS
Contact:
Claiton de Oliveira
Goper Engenharia de Software Ltda
www.goper.com.br

Two points can be highlighted:
- The lack of knowledge of language;
- Total lack of attention and without "programming logic".
NaPraia
Rank: Analista Júnior
Rank: Analista Júnior
Posts: 88
Joined: Fri, 22 Feb 2008 8:24 am
Location: Floripa - SC

These NVLs killed the dick

and how much the content of the IF and the ELSE are equal, has no less logical explanation. It must be a trainee thing
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

Worse is not !!! hehehe

Fortunately, it is not allowed to quote names in this forum of "Doubtful Codes", heheheh
rodfbar
Rank: DBA Pleno
Rank: DBA Pleno
Posts: 241
Joined: Tue, 09 Oct 2007 11:15 am
Location: Batatais - SP

NVL Returning NULL


If it were in a DML Pro Bank ... Baro would return something like


ORA-00666-User, this slutty with my face, the Lord is a buck ...

kkkkkk

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 13 guests