Skip to content

Commit 294c889

Browse files
authored
Merge pull request #9032 from WilliamAntonRohm/t-sql-5
do not review -- improving T-SQL articles' Acrolinx scores -- batch 5
2 parents 26d60b3 + 4a69f35 commit 294c889

5 files changed

Lines changed: 49 additions & 55 deletions

File tree

docs/t-sql/data-types/decimal-and-numeric-transact-sql.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ Numeric data types that have fixed precision and scale. Decimal and numeric are
3535

3636
## Arguments
3737
**decimal**[ **(**_p_[ **,**_s_] **)**] and **numeric**[ **(**_p_[ **,**_s_] **)**]
38-
Fixed precision and scale numbers. When maximum precision is used, valid values are from - 10^38 +1 through 10^38 - 1. The ISO synonyms for **decimal** are **dec** and **dec(**_p_, _s_**)**. **numeric** is functionally equivalent to **decimal**.
38+
Fixed precision and scale numbers. When maximum precision is used, valid values are from - 10^38 +1 through 10^38 - 1. The ISO synonyms for **decimal** are **dec** and **dec(**_p_, _s_**)**. **numeric** is functionally identical to **decimal**.
3939

4040
p (precision)
41-
The maximum total number of decimal digits that will be stored, both to the left and to the right of the decimal point. The precision must be a value from 1 through the maximum precision of 38. The default precision is 18.
41+
The maximum total number of decimal digits to be stored. This number includes both the left and the right sides of the decimal point. The precision must be a value from 1 through the maximum precision of 38. The default precision is 18.
4242

4343
> [!NOTE]
4444
> Informatica only supports 16 significant digits, regardless of the precision and scale specified.
4545
4646
*s* (scale)
47-
The number of decimal digits that will be stored to the right of the decimal point. This number is subtracted from *p* to determine the maximum number of digits to the left of the decimal point. Scale must be a value from 0 through *p*. Scale can be specified only if precision is specified. The default scale is 0; therefore, 0 <= *s* \<= *p*. Maximum storage sizes vary, based on the precision.
47+
The number of decimal digits that are stored to the right of the decimal point. This number is subtracted from *p* to determine the maximum number of digits to the left of the decimal point. Scale must be a value from 0 through *p*, and can only be specified if precision is specified. The default scale is 0 and so 0 <= *s* \<= *p*. Maximum storage sizes vary, based on the precision.
4848

4949
|Precision|Storage bytes|
5050
|---|---|
@@ -57,18 +57,18 @@ The number of decimal digits that will be stored to the right of the decimal poi
5757
> Informatica (connected through the SQL Server PDW Informatica Connector) only supports 16 significant digits, regardless of the precision and scale specified.
5858
5959
## Converting decimal and numeric data
60-
For the **decimal** and **numeric** data types, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] considers each specific combination of precision and scale as a different data type. For example, **decimal(5,5)** and **decimal(5,0)** are considered different data types.
60+
For **decimal** and **numeric** data types, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] considers each combination of precision and scale as a different data type. For example, **decimal(5,5)** and **decimal(5,0)** are considered different data types.
6161

6262
In [!INCLUDE[tsql](../../includes/tsql-md.md)] statements, a constant with a decimal point is automatically converted into a **numeric** data value, using the minimum precision and scale necessary. For example, the constant 12.345 is converted into a **numeric** value with a precision of 5 and a scale of 3.
6363

6464
Converting from **decimal** or **numeric** to **float** or **real** can cause some loss of precision. Converting from **int**, **smallint**, **tinyint**, **float**, **real**, **money**, or **smallmoney** to either **decimal** or **numeric** can cause overflow.
6565

66-
By default, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] uses rounding when converting a number to a **decimal** or **numeric** value with a lower precision and scale. However, if the SET ARITHABORT option is ON, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] raises an error when overflow occurs. Loss of only precision and scale is not sufficient to raise an error.
66+
By default, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] uses rounding when converting a number to a **decimal** or **numeric** value with a lower precision and scale. Conversely, if the SET ARITHABORT option is ON, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] raises an error when overflow occurs. Loss of only precision and scale isn't sufficient to raise an error.
6767

6868
When converting float or real values to decimal or numeric, the decimal value will never have more than 17 decimals. Any float value < 5E-18 will always convert as 0.
6969

7070
## Examples
71-
The following example creates a table using the **decimal** and **numeric** data types. Values are inserted into each column and the results are returned by using a SELECT statement.
71+
The following example creates a table using the **decimal** and **numeric** data types. Values are inserted into each column. The results are returned by using a SELECT statement.
7272

7373
```sql
7474
CREATE TABLE dbo.MyTable
@@ -104,5 +104,4 @@ MyDecimalColumn MyNumericColumn
104104
[DECLARE @local_variable &#40;Transact-SQL&#41;](../../t-sql/language-elements/declare-local-variable-transact-sql.md)
105105
[SET @local_variable &#40;Transact-SQL&#41;](../../t-sql/language-elements/set-local-variable-transact-sql.md)
106106
[sys.types &#40;Transact-SQL&#41;](../../relational-databases/system-catalog-views/sys-types-transact-sql.md)
107-
108-
107+

docs/t-sql/database-console-commands/dbcc-flushauthcache-transact-sql.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ monikerRange: "= azuresqldb-current || = sqlallproducts-allversions"
2323
# DBCC FLUSHAUTHCACHE (Transact-SQL)
2424
[!INCLUDE[tsql-appliesto-xxxxxx-asdb-xxxx-xxx-md](../../includes/tsql-appliesto-xxxxxx-asdb-xxxx-xxx-md.md)]
2525

26-
Empties the database authentication cache containing information about logins and firewall rules, for the current user database in [!INCLUDE[ssSDS](../../includes/sssds-md.md)]. This statement does not apply to the logical master database, because the master database contains the physical storage for the information about logins and firewall rules. The user executing the statement and other currently connected users remain connected. (DBCC FLUSHAUTHCACHE is not currently supported for [!INCLUDE[ssSDW_md](../../includes/sssdw-md.md)].)
26+
Empties the database authentication cache containing information about logins and firewall rules, for the current user database in [!INCLUDE[ssSDS](../../includes/sssds-md.md)]. This statement doesn't apply to the logical master database, because the master database contains the physical storage for the information about logins and firewall rules. The user executing the statement and other currently connected users remain connected. (DBCC FLUSHAUTHCACHE isn't currently supported for [!INCLUDE[ssSDW_md](../../includes/sssdw-md.md)].)
2727

28-
![Topic link icon](../../database-engine/configure-windows/media/topic-link.gif "Topic link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
28+
![Article link icon](../../database-engine/configure-windows/media/topic-link.gif "Article link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
2929

3030
## Syntax
3131

@@ -37,8 +37,8 @@ DBCC FLUSHAUTHCACHE [ ; ]
3737
None.
3838

3939
## Remarks
40-
The authentication cache makes a copy of logins and server firewall rules that are stored in master and places them in memory in the user database. Since information about contained database users are already stored in the user database, contained database users are not part of the authentication cache.
41-
Continuously active connections to [!INCLUDE[ssSDS](../../includes/sssds-md.md)] require reauthorization (performed by the [!INCLUDE[ssDE](../../includes/ssde-md.md)]) at least every 10 hours. The [!INCLUDE[ssDE](../../includes/ssde-md.md)] attempts reauthorization using the originally submitted password and no user input is required. For performance reasons, when a password is reset in [!INCLUDE[ssSDS](../../includes/sssds-md.md)], the connection will not be re-authenticated, even if the connection is reset due to connection pooling. This is different from the behavior of on-premises [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. If the password has been changed since the connection was initially authorized, the connection must be terminated and a new connection made using the new password. A user with the KILL DATABASE CONNECTION permission can explicitly terminate a connection to [!INCLUDE[ssSDS](../../includes/sssds-md.md)] by using the [KILL &#40;Transact-SQL&#41;](../../t-sql/language-elements/kill-transact-sql.md) command.
40+
The authentication cache makes a copy of logins and server firewall rules stored in master, and places them in memory in the user database. Since information about contained database users is already stored in the user database, contained database users aren't part of the authentication cache.
41+
Continuously active connections to [!INCLUDE[ssSDS](../../includes/sssds-md.md)] require reauthorization (performed by the [!INCLUDE[ssDE](../../includes/ssde-md.md)]) at least every 10 hours. The [!INCLUDE[ssDE](../../includes/ssde-md.md)] attempts reauthorization using the originally submitted password and no user input is required. For performance reasons, when a password is reset in [!INCLUDE[ssSDS](../../includes/sssds-md.md)], the connection won't be reauthenticated, even if the connection is reset because of connection pooling. This behavior is different from the behavior of on-premises [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. If the password has changed since the connection was initially authorized, the connection must be terminated and a new connection made using the new password. A user with the KILL DATABASE CONNECTION permission can explicitly terminate a connection to [!INCLUDE[ssSDS](../../includes/sssds-md.md)] by using the [KILL &#40;Transact-SQL&#41;](../../t-sql/language-elements/kill-transact-sql.md) command.
4242

4343
## Permissions
4444
Requires the [!INCLUDE[ssSDS](../../includes/sssds-md.md)] admin account.
@@ -53,4 +53,3 @@ DBCC FLUSHAUTHCACHE;
5353
## See Also
5454
[DBCC &#40;Transact-SQL&#41;](../../t-sql/database-console-commands/dbcc-transact-sql.md)
5555

56-

docs/t-sql/language-elements/some-any-transact-sql.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ scalar_expression { = | < > | ! = | > | > = | ! > | < | < = | ! < }
5858
SOME or ANY returns **TRUE** when the comparison specified is TRUE for any pair (_scalar_expression_**,**_x_) where *x* is a value in the single-column set; otherwise, returns **FALSE**.
5959

6060
## Remarks
61-
SOME requires the *scalar_expression* to compare positively to at least one value returned by the subquery. For statements that require the *scalar_expression* to compare positively to every value that is returned by the subquery, see [ALL &#40;Transact-SQL&#41;](../../t-sql/language-elements/all-transact-sql.md). For instance, if the subquery returns values of 2 and 3, *scalar_expression* = SOME (subquery) would evaluate as TRUE for a *scalar_express* of 2. If the subquery returns values of 2 and 3, *scalar_expression* = ALL (subquery) would evaluate as FALSE, because some of the values of the subquery (the value of 3) would not meet the criteria of the expression.
61+
SOME requires the *scalar_expression* to compare positively to at least one value returned by the subquery. For statements that require the *scalar_expression* to compare positively to every value that is returned by the subquery, see [ALL &#40;Transact-SQL&#41;](../../t-sql/language-elements/all-transact-sql.md). For instance, if the subquery returns values of 2 and 3, *scalar_expression* = SOME (subquery) would evaluate as TRUE for a *scalar_express* of 2. If the subquery returns values of 2 and 3, *scalar_expression* = ALL (subquery) would evaluate as FALSE, because some of the values of the subquery (the value of 3) wouldn't meet the criteria of the expression.
6262

6363
## Examples
6464

@@ -84,7 +84,7 @@ ELSE
8484
PRINT 'FALSE' ;
8585
```
8686

87-
The following query returns `FALSE` because `3` is not less than all of the values in the table.
87+
The following query returns `FALSE` because `3` isn't less than all of the values in the table.
8888

8989
```
9090
IF 3 < ALL (SELECT ID FROM T1)
@@ -110,13 +110,13 @@ IF
110110
ON Sales.SalesOrderDetail.ProductID = Production.Product.ProductID
111111
WHERE SalesOrderID = @OrderID
112112
)
113-
PRINT 'At least one item for this order cannot be manufactured in specified number of days.'
113+
PRINT 'At least one item for this order can't be manufactured in specified number of days.'
114114
ELSE
115115
PRINT 'All items for this order can be manufactured in the specified number of days or less.' ;
116116
117117
```
118118

119-
To test the procedure, execute the procedure by using the `SalesOrderID``49080`, which has one component that requires `2` days and two components that require 0 days. The first statement meets the criteria. The second query does not.
119+
To test the procedure, execute the procedure by using the `SalesOrderID``49080`, which has one component that requires `2` days and two components that require 0 days. The first statement meets the criteria. The second query doesn't.
120120

121121
```
122122
EXECUTE ManyDaysToComplete 49080, 2 ;
@@ -132,7 +132,7 @@ EXECUTE ManyDaysToComplete 49080, 1 ;
132132

133133
[!INCLUDE[ssResult](../../includes/ssresult-md.md)]
134134

135-
`At least one item for this order cannot be manufactured in specified number of days.`
135+
`At least one item for this order can't be manufactured in specified number of days.`
136136

137137
## See Also
138138
[ALL &#40;Transact-SQL&#41;](../../t-sql/language-elements/all-transact-sql.md)
@@ -143,4 +143,3 @@ EXECUTE ManyDaysToComplete 49080, 1 ;
143143
[WHERE &#40;Transact-SQL&#41;](../../t-sql/queries/where-transact-sql.md)
144144
[IN &#40;Transact-SQL&#41;](../../t-sql/language-elements/in-transact-sql.md)
145145

146-

docs/t-sql/spatial-geometry/stgeomcollfromwkb-geometry-data-type.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ STGeomCollFromWKB ( 'WKB_geometrycollection' , SRID )
4646
## Remarks
4747
The OGC type of the **geometry** instance returned by `STGeomCollFromWKB()` is set to **GeomCollection**, **MultiPolygon**, **MultiLineString**, or **MultiPoint**, depending on the corresponding WKB input.
4848

49-
This method will throw a FormatException exception if the input is not well-formatted.
49+
This method will throw a FormatException exception if the input isn't well-formatted.
5050

5151
## Examples
5252
The following example uses `STGeomCollFromWKB()` to create a **geometry** instance.
@@ -60,5 +60,3 @@ SELECT @g.STAsText();
6060
## See Also
6161
[OGC Static Geometry Methods](../../t-sql/spatial-geometry/ogc-static-geometry-methods.md)
6262

63-
64-

0 commit comments

Comments
 (0)