Sunday, 25 September 2016

All You Need To Know About NULL Value Functions

Teradata SQL Null functions
NULL functions
The below are the Null value functions in Tearadata. One is "NVL" and another one is "NVL2". These two functions are part of Teradata SQL.

NVL -The NVL function replace null value with a string or numeric value. This is the functionality is same as Teradata function NULLIF. It requires two arguments. If the value is not null, it will not do anything.

The best SQL NVL function:

SELECT NVL (NULL,'USA'), NVL('SPAIN','USA');
-----------
USA  SPAIN

Also Read: Top 70 Teradata Interview Questions

The NVL2 function: Returns one of two specified values (arguments#2 and Arguments#3) based on weather the first arguments in NULL or not. It requires three arguments. The rule is as follows:
  • If expression 1 is not null, expression 2 is returned
  • If expression 1 is null, expression 3 is returned
The best NVL2  example

SELECT NVL2(NULL,'FRANCE','SPAIN'), NVL2('ENGLAND','FRANCE','SPAIN')
-------------------
SPAIN   FRANCE

5 comments:

  1. Null value functions have some specially function for the many projects.There are many options for improving the procedure of making the teradata for the advanced community.The website with writing services would be great opportunity for the development of the null value in the project development.

    ReplyDelete
  2. OK, let's take it easy and try to think about it. Even though you tried to explain everything for everyone and for me too, but I understood nothing. If you want to get how to explain everything to let everybody get it, take this useful link and you'll become perfect for me.

    ReplyDelete
  3. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Teradata , kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on Teradata. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.

    For Free Demo Contact us:
    Name : Arunkumar U
    Email : arun@maxmunus.com
    Skype id: training_maxmunus
    Contact No.-+91-9738507310
    Company Website –http://www.maxmunus.com


    ReplyDelete
  4. This stage is also a pre-coding stage, where the data model is outlined in the abstract, to depict on paper how the data is used, how the different business entities interact with it, and how transactions flow through the enterprise.
    google dashboard

    ReplyDelete
  5. Informative data. i am looking forSAP HANA Online Training from professional expert.

    ReplyDelete