Decode x NVL

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
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Personnel, I saw in a code, the following stretch:

Select all

 
  AND DECODE(NRO_RG, NULL, NRO_CPF, NRO_RG); 
Sorry for ignorance, but even for performance reasons, it would not be better below:

Select all

 
  AND NVL(NRO_RG,NRO_CPF); 
If I am wrong, please correct me in this topic.

Hugs,

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

Do not worry, you're very well.
There is no reason to make such a decode. :-O
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Vlw Brother.
Blaza.
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 23 guests