A C/C++ developer since 2000, doing SQL, Ms-Access and MS-Office projects since 2007. Since 2011 moving to the exciting world of Business Intelligence. Located in Sydney, Australia, and a mother of three kids.
This is the script to finding out the maximum number for a decimal in a column (how many decimals are there after the decimal point) SELECT
MAX(LEN(CAST([aFloatColumn]AS VARCHAR(255))) - CHARINDEX('.',CAST([aFloatColumn]AS VARCHAR(255))))