T SQL Date format convert function

 How many time you had to t sql date format date specific way such as yyyymmdd ??   Many people don’t know hidden feature of builtin T-SQL CONVERT function . This function can not only convert data types but also change format of  dates/numbers. …

SQL Date format using T-SQL CONVERT function (More than 40 formats) Read more »

T SQL Date format convert function

Northwind is my favorite database for trying out sample T-SQL scripts because of its simplicity. Here is the full script you can just copy/paste and run in SSMS (for sql server) or SQL Developer (for oracle) to create Northwind database …

Northwind Database Creation Script for SQL Server and Oracle Read more »

T SQL Date format convert function

Just came across very interesting scenario where I had to consume JSON data in SQL Server. Yes I can write C#/VB.net code and load JSON to SQL Server and go from there but what if I have no expertise in …

Consuming JSON data in SQL Server and SSIS, convert JSON to XML Read more »

T SQL Date format convert function

If you ever try to update several millions of record in single Update statement then think several times because it can cause real pain. Disadvantage of single Update statement is … Its considered as single transaction and it doesn’t commit …

How to update large number of records in batch Read more »

T SQL Date format convert function

Here is reusable function which can be used to format SQL dateTime to any format like C# or VB.net DROP FUNCTION dbo.fnFormatDate GO CREATE FUNCTION dbo.fnFormatDate (@Datetime DATETIME, @FormatMask VARCHAR(100)) RETURNS VARCHAR(100) AS BEGIN DECLARE @StringDate VARCHAR(100) SET @StringDate = …

T-SQL Date Format Function – fnDateFormat like .net Read more »