You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -171,7 +171,7 @@ The settings are located in the project "[\SQL-Server-Assess\Development Applica
171
171
172
172
# Current High Check Id
173
173
174
-
## Next Check Id: 28
174
+
## Next Check Id: 29
175
175
176
176
# Naming Conventions
177
177
@@ -486,7 +486,7 @@ Being frugal with memory is important for large tables, not only to save space b
486
486
487
487
488
488
## Using MONEY Data Type
489
-
**Check Id:**[NONE YET]
489
+
**Check Id:**28
490
490
491
491
The MONEY data type confuses the storage of data values with their display, though it clearly suggests, by its name, the sort of data held. Use DECIMAL(19, 4) instead. It is proprietary to SQL Server.
ANDTL.MinimumColumnLength<=TL.StandardColumnLength*1.3/* The "* 1.3" is allowing a 30% buffer above standard column length to look for encryption/hashing. */
,Priority = '+CAST(@Priority ASNVARCHAR(MAX)) + N'
2057
+
,Schema_Id = S.schema_id
2058
+
,SchemaName = S.name
2059
+
,Object_Id = O.object_id
2060
+
,ObjectName = O.name + ''.'' + C.Name
2061
+
,ObjectType = ''COLUMN''
2062
+
,Details = N''This column uses the '' + UPPER(T.name) + N'' data type, which has limited precision and can lead to roundoff errors. Consider using DECIMAL(19, 4) instead.''
2063
+
FROM
2064
+
'+QUOTENAME(@DatabaseName) + N'.sys.objects AS O
2065
+
INNER JOIN '+QUOTENAME(@DatabaseName) + N'.sys.schemas AS S ON S.schema_id = O.schema_id
2066
+
INNER JOIN '+QUOTENAME(@DatabaseName) + N'.sys.columns AS C ON C.object_id = O.object_id
2067
+
INNER JOIN '+QUOTENAME(@DatabaseName) + N'.sys.types AS T on T.user_type_id = C.user_type_id
2068
+
WHERE
2069
+
T.name IN (''money'', ''smallmoney'');';
2070
+
2071
+
EXECsys.sp_executesql @stmt = @StringToExecute;
2072
+
IF @Debug =2AND @StringToExecute ISNOTNULLPRINT @StringToExecute;
0 commit comments