Thứ Ba, 18 tháng 7, 2017

Decimal - Remove Trailing Zeros

public static decimal RemoveTrailingZeros(this decimal d)
{
 return d / 1.0000000000000000000000000000M;
}

public static string ToStringIgnoreTrailingZeros(this decimal d)
{
 return d.ToString("#,##0.############################");
}

Thứ Năm, 8 tháng 6, 2017

Thứ Ba, 18 tháng 4, 2017

[SQL] Checking ANSI_NULLS and QUOTED_IDENTIFIER Options

SELECT o.name, o.xtype, m.definition, m.uses_ansi_nulls, m.uses_quoted_identifier
FROM sys.sql_modules  m  
INNER JOIN sysobjects o ON m.object_id = o.id