S&M NuTec, the company that produces Greenies, furnished us a copy of the complete statement they sent to KIRO-TV, which touches on some of the cases discussed: Our Commitment to Healthy Pets Our company was founded and is staffed by people who are deeply passionate about pets and their welfare.
This SQL Server tutorial explains how to use the LEAD function in SQL Server (Transact-SQL) with syntax and examples. In SQL Server (Transact-SQL), the LEAD function is an analytic function that lets you query more than one row in a table at a time without having to join the table to itself.
Nulls in SQL Functions. Most scalar functions return null when given a null argument. You can use the NVL function to return a value when a null occurs. For example, the expression NVL(commission_pct,0) returns 0 if commission_pct is null or the value of commission_pct if it is not null.