If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > is null or nvl()

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-11-07, 17:26
superdrog superdrog is offline
Registered User
 
Join Date: Jun 2007
Posts: 25
is null or nvl()

im trying to select * information about a product where its name is populated and i dont know if is not null or nvl() is better???
any suggestions
Reply With Quote
  #2 (permalink)  
Old 07-11-07, 19:54
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
IS NOT NULL is better, because it's standard, and thus also portable
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 07-12-07, 05:13
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Alternatively, you could use the COALESCE() function. This is also SQL. NLV is only a proprietary extension of MS SQL Server.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #4 (permalink)  
Old 07-13-07, 11:31
Littlefoot Littlefoot is offline
Lost Boy
 
Join Date: Jan 2004
Location: Croatia, Europe
Posts: 3,629
Quote:
Originally Posted by stolze
NLV is only a proprietary extension of MS SQL Server.
I know absolutelly nothing about MS SQL Server, but I know that Oracle offers the NVL function.
Reply With Quote
  #5 (permalink)  
Old 07-14-07, 05:05
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Quote:
Originally Posted by Littlefoot
I know absolutelly nothing about MS SQL Server, but I know that Oracle offers the NVL function.
Same thing. COALESCE is what the SQL standard defines. NVL is a proprietary extension that provides the same functionality as COALESCE. If you want to stick to portable SQL, COALESCE would be your best choice.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #6 (permalink)  
Old 07-14-07, 05:20
Littlefoot Littlefoot is offline
Lost Boy
 
Join Date: Jan 2004
Location: Croatia, Europe
Posts: 3,629
Oh, I'm not saying a word about the COALESCE; I was just complaining about the proprietary term.

Webopedia:
Quote:
Privately owned and controlled. In the computer industry, proprietary is the opposite of open. A proprietary design or technique is one that is owned by a company. It also implies that the company has not divulged specifications that would allow other companies to duplicate the product.
eLook:
Quote:
protected by trademark or patent or copyright; made or produced or distributed by one having exclusive rights
All I wanted to say was that - if I correctly understood what proprietary means - NVL is not proprietary of Microsoft. If I'm wrong about it, I apologize.
Reply With Quote
  #7 (permalink)  
Old 07-14-07, 07:15
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
Quote:
Originally Posted by Littlefoot
NVL is not proprietary of Microsoft. If I'm wrong about it, I apologize.
no need

NVL doesn't even exist in SQL Server
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #8 (permalink)  
Old 07-16-07, 10:59
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Now I know the reason for your response. For me, "proprietary" means that it is not standardized.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #9 (permalink)  
Old 07-16-07, 12:26
Littlefoot Littlefoot is offline
Lost Boy
 
Join Date: Jan 2004
Location: Croatia, Europe
Posts: 3,629
I'd call it charm of English as a foreign language. Perhaps it is time to take a dictionary and see what it says about something being proprietary.
Reply With Quote
  #10 (permalink)  
Old 09-25-07, 06:47
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,
in Viper 2 - next version of DB2 now in beta release at the moment, NLV function will be supported in DB2 too. COALESCE is a standard, but NLV uses Oracle one of the biggest RDMBS (if not the first) of market share and IBM wants to get Oracle users to DB2. To make application migration easer this is obvious step. In terms of commodization.
Hope this helps,
Grofaty
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On