Monday, December 19, 2016

SQL Server TRIM Function

I always wondering, why do I have to create my own TRIM function  in SQL Server, all this time. Even the self made TRIM function is simple to be done, but still looks silly when others have the build in function.

But don't worry, the new version of SQL Server (code name SQL Server vNext), adding the TRIM function as build in function, finally...

Beside the TRIM function, another build in functions are CONCAT_WS and TRANSLATE, based on this article.

The latest version SQL Server vNEXT is CTP 1.1 by this December. You can read the full features by clicking this link, as well as download the CTP version

Monday, September 26, 2016

SQL Server Function to Get How Long in Word

This below SQL User Defined Function script is to returns How Long the date already passed, in wording. It's usually displayed in articles to inform the reader how long the article already posted.