SQL Server

Example 2: In the following table called Customers, return only one Phone Number with priority to CellPhone first, then DayPhone, then NightPhone.


Example: In the following table called Customers, return only one Phone Number with priority to CellPhone first then DayPhone. Return Cellphone is CellPhone is not Null.


Method 1

Simple Case Statement with one expressions


Example: In the following table called Customers, return the Phone Number if the ContactbyPhone is
Y, otherwise if the ContactbyPhone is Null, return the Email.


Example 1: In the following table called Customers, return only one Phone Number with priority to CellPhone first then DayPhone. Return Cellphone is CellPhone is not NUll.


User login