Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SELECT ISNULL(CONVERT(VARCHAR(MAX), ord.OrderDate), 'Sin Fecha')
FROM [ORDER] ord;
GO
/** Output **/
--------------------
Jul 4 2012 12:00AM
Jul 5 2012 12:00AM
Jul 8 2012 12:00AM
Jul 8 2012 12:00AM
Jul 9 2012 12:00AM
Jul 10 2012 12:00AM
Jul 11 2012 12:00AM
Jul 12 2012 12:00AM
...
SELECT NULLIF(100, 50*2);
GO
/** Output **/
----
NULL
SELECT NULLIF(2*2, 2*7);
GO
/** Output **/
-----------
4
SELECT COALESCE(sup.Phone, sup.Fax) "Contacto"
FROM Supplier sup;
GO
/** Output **/
Contacto
------------------------------
(171) 555-2222
(100) 555-4822
(313) 555-5735
(03) 3555-5011
(98) 598 76 54
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.