Skip to content

Commit a2d4e73

Browse files
author
Bruce Hamilton
committed
A - C fixes
1 parent 3ca9429 commit a2d4e73

55 files changed

Lines changed: 2830 additions & 2876 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "ABS (Transact-SQL) | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "03/15/2017"
4+
ms.date: "07/24/2017"
55
ms.prod: "sql-non-specified"
66
ms.reviewer: ""
77
ms.suite: ""
@@ -28,58 +28,58 @@ manager: "jhubbard"
2828
# ABS (Transact-SQL)
2929
[!INCLUDE[tsql-appliesto-ss2008-all_md](../../includes/tsql-appliesto-ss2008-all-md.md)]
3030

31-
A mathematical function that returns the absolute (positive) value of the specified numeric expression. (`ABS` changes negative values to positive values. `ABS` has no effect on zero or positive values.)
31+
A mathematical function that returns the absolute (positive) value of the specified numeric expression. (`ABS` changes negative values to positive values. `ABS` has no effect on zero or positive values.)
3232

33-
![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)
33+
![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)
3434

3535
## Syntax
3636

37-
```
37+
```sql
3838
ABS ( numeric_expression )
3939
```
4040

4141
## Arguments
42-
*numeric_expression*
43-
Is an expression of the exact numeric or approximate numeric data type category.
42+
*numeric_expression*
43+
Is an expression of the exact numeric or approximate numeric data type category.
4444

4545
## Return Types
46-
Returns the same type as *numeric_expression*.
46+
Returns the same type as *numeric_expression*.
4747

4848
## Examples
49-
The following example shows the results of using the `ABS` function on three different numbers.
49+
The following example shows the results of using the `ABS` function on three different numbers.
5050

51-
```tsql
51+
```sql
5252
SELECT ABS(-1.0), ABS(0.0), ABS(1.0);
5353
```
5454

55-
[!INCLUDE[ssResult](../../includes/ssresult-md.md)]
55+
[!INCLUDE[ssResult](../../includes/ssresult-md.md)]
5656

57-
```
57+
```sql
5858
---- ---- ----
5959
1.0 .0 1.0
6060
```
6161

62-
The `ABS` function can produce an overflow error when the absolute value of a number is greater than the largest number that can be represented by the specified data type. For example, the `int` data type can hold only values that range from `-2,147,483,648` to `2,147,483,647`. Computing the absolute value for the signed integer `-2,147,483,648` causes an overflow error because its absolute value is greater than the positive range for the `int` data type.
62+
The `ABS` function can produce an overflow error when the absolute value of a number is greater than the largest number that can be represented by the specified data type. For example, the `int` data type can hold only values that range from `-2,147,483,648` to `2,147,483,647`. Computing the absolute value for the signed integer `-2,147,483,648` causes an overflow error because its absolute value is greater than the positive range for the `int` data type.
6363

64-
```tsql
64+
```sql
6565
DECLARE @i int;
6666
SET @i = -2147483648;
6767
SELECT ABS(@i);
6868
GO
6969
```
7070

71-
Here is the error message:
71+
Here is the error message:
7272

73-
"Msg 8115, Level 16, State 2, Line 3"
73+
"Msg 8115, Level 16, State 2, Line 3"
7474

75-
"Arithmetic overflow error converting expression to data type int."
75+
"Arithmetic overflow error converting expression to data type int."
7676

7777

78-
## See Also
79-
[CAST and CONVERT (Transact-SQL)](../../t-sql/functions/cast-and-convert-transact-sql.md)
80-
[Data Types (Transact-SQL)](../../t-sql/data-types/data-types-transact-sql.md)
81-
[Mathematical Functions (Transact-SQL)](../../t-sql/functions/mathematical-functions-transact-sql.md)
82-
[Built-in Functions (Transact-SQL)](../../t-sql/functions/functions.md)
78+
## See also
79+
[CAST and CONVERT (Transact-SQL)](../../t-sql/functions/cast-and-convert-transact-sql.md)
80+
[Data Types (Transact-SQL)](../../t-sql/data-types/data-types-transact-sql.md)
81+
[Mathematical Functions (Transact-SQL)](../../t-sql/functions/mathematical-functions-transact-sql.md)
82+
[Built-in Functions (Transact-SQL)](../../t-sql/functions/functions.md)
8383

8484

8585

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "ACOS (Transact-SQL) | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "03/15/2017"
4+
ms.date: "07/24/2017"
55
ms.prod: "sql-non-specified"
66
ms.reviewer: ""
77
ms.suite: ""
@@ -27,65 +27,67 @@ manager: "jhubbard"
2727
# ACOS (Transact-SQL)
2828
[!INCLUDE[tsql-appliesto-ss2008-all_md](../../includes/tsql-appliesto-ss2008-all-md.md)]
2929

30-
A mathematical function that returns the angle, in radians, whose cosine is the specified **float** expression; also called arccosine.
30+
A mathematical function that returns the angle, in radians, whose cosine is the specified **float** expression; also called arccosine.
3131

32-
![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)
32+
![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)
3333

3434
## Syntax
3535

36-
```
36+
```sql
3737
-- Syntax for SQL Server, Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse
3838

3939
ACOS ( float_expression )
4040
```
4141

4242
## Arguments
43-
*float_expression*
44-
Is an expression of the type **float** or of a type that can be implicitly converted to **float**, with a value from -1 through 1. Values outside this range return NULL and report a domain error.
43+
*float_expression*
44+
Is an expression of the type **float** or of a type that can be implicitly converted to **float**, with a value from -1 through 1. Values outside this range return NULL and report a domain error.
4545

4646
## Return Types
47-
**float**
47+
**float**
4848

4949
## Examples
50-
The following example returns the ACOS of the specified number.
50+
The following example returns the ACOS of the specified number.
5151

52-
```
52+
```sql
5353
SET NOCOUNT OFF;
5454
DECLARE @cos float;
5555
SET @cos = -1.0;
5656
SELECT 'The ACOS of the number is: ' + CONVERT(varchar, ACOS(@cos));
5757
```
5858

59-
[!INCLUDE[ssResult](../../includes/ssresult-md.md)]
59+
[!INCLUDE[ssResult](../../includes/ssresult-md.md)]
6060

61-
```
61+
```sql
6262
---------------------------------
6363
The ACOS of the number is: 3.14159
6464

6565
(1 row(s) affected)
6666
```
6767

68-
## Examples: [!INCLUDE[ssSDWfull](../../includes/sssdwfull-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)]
69-
The following example returns the ACOS of the specified number.
68+
## Examples:
69+
[!INCLUDE[ssSDWfull](../../includes/sssdwfull-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)]
70+
71+
The following example returns the ACOS of the specified number.
7072

71-
```
73+
```sql
7274
DECLARE @cos float;
7375
SET @cos = -1.0;
7476
SELECT 'The ACOS of the number is: ' + CONVERT(varchar, ACOS(@cos));
7577
```
7678

77-
[!INCLUDE[ssResult](../../includes/ssresult-md.md)]
79+
[!INCLUDE[ssResult](../../includes/ssresult-md.md)]
7880

79-
```
81+
```sql
8082
---------------------------------
8183
The ACOS of the number is: 3.14159
8284

8385
(1 row(s) affected)
8486
```
8587

86-
## See Also
87-
[Mathematical Functions (Transact-SQL)](../../t-sql/functions/mathematical-functions-transact-sql.md)
88-
[Functions](../../t-sql/functions/functions.md)
88+
## See also
89+
[Mathematical Functions (Transact-SQL)](../../t-sql/functions/mathematical-functions-transact-sql.md)
90+
[Functions](../../t-sql/functions/functions.md)
8991

9092

9193

docs/t-sql/functions/aggregate-functions-transact-sql.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Aggregate Functions (Transact-SQL) | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "03/15/2017"
4+
ms.date: "07/24/2017"
55
ms.prod: "sql-non-specified"
66
ms.reviewer: ""
77
ms.suite: ""
@@ -25,17 +25,15 @@ manager: "jhubbard"
2525
# Aggregate Functions (Transact-SQL)
2626
[!INCLUDE[tsql-appliesto-ss2008-all_md](../../includes/tsql-appliesto-ss2008-all-md.md)]
2727

28-
Aggregate functions perform a calculation on a set of values and return a single value. Except for COUNT, aggregate functions ignore null values. Aggregate functions are frequently used with the GROUP BY clause of the SELECT statement.
28+
Aggregate functions perform a calculation on a set of values and return a single value. Except for COUNT, aggregate functions ignore null values. Aggregate functions are frequently used with the GROUP BY clause of the SELECT statement.
2929

30-
All aggregate functions are deterministic. This means aggregate functions return the same value any time that they are called by using a specific set of input values. For more information about function determinism, see [Deterministic and Nondeterministic Functions](../../relational-databases/user-defined-functions/deterministic-and-nondeterministic-functions.md). The [OVER clause](../../t-sql/queries/select-over-clause-transact-sql.md) may follow all aggregate functions except GROUPING and GROUPING_ID.
31-
32-
Aggregate functions can be used as expressions only in the following:
30+
All aggregate functions are deterministic. This means aggregate functions return the same value any time that they are called by using a specific set of input values. For more information about function determinism, see [Deterministic and Nondeterministic Functions](../../relational-databases/user-defined-functions/deterministic-and-nondeterministic-functions.md). The [OVER clause](../../t-sql/queries/select-over-clause-transact-sql.md) may follow all aggregate functions except GROUPING and GROUPING_ID.
3331

32+
Aggregate functions can be used as expressions only in the following:
3433
- The select list of a SELECT statement (either a subquery or an outer query).
35-
3634
- A HAVING clause.
3735

38-
[!INCLUDE[tsql](../../includes/tsql-md.md)] provides the following aggregate functions:
36+
[!INCLUDE[tsql](../../includes/tsql-md.md)] provides the following aggregate functions:
3937

4038
|||
4139
|-|-|
@@ -47,8 +45,8 @@ manager: "jhubbard"
4745
|[GROUPING_ID](../../t-sql/functions/grouping-id-transact-sql.md)|[VARP](../../t-sql/functions/varp-transact-sql.md)|
4846
|[MAX](../../t-sql/functions/max-transact-sql.md)||
4947

50-
## See Also
51-
[Built-in Functions (Transact-SQL)](../../t-sql/functions/functions.md)
52-
[OVER Clause (Transact-SQL)](../../t-sql/queries/select-over-clause-transact-sql.md)
48+
## See also
49+
[Built-in Functions (Transact-SQL)](../../t-sql/functions/functions.md)
50+
[OVER Clause (Transact-SQL)](../../t-sql/queries/select-over-clause-transact-sql.md)
51+
5352

54-
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Analytic Functions (Transact-SQL) | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "03/06/2017"
4+
ms.date: "07/24/2017"
55
ms.prod: "sql-non-specified"
66
ms.reviewer: ""
77
ms.suite: ""
@@ -20,16 +20,16 @@ manager: "jhubbard"
2020
# Analytic Functions (Transact-SQL)
2121
[!INCLUDE[tsql-appliesto-ss2012-all_md](../../includes/tsql-appliesto-ss2012-all-md.md)]
2222

23-
SQL Server supports the following analytic functions. Analytic functions compute an aggregate value based on a group of rows. However, unlike aggregate functions, they can return multiple rows for each group. You can use analytic functions to compute moving averages, running totals, percentages or top-N results within a group.
24-
25-
|||
26-
|-|-|
27-
|[CUME_DIST (Transact-SQL)](../../t-sql/functions/cume-dist-transact-sql.md)|[LEAD (Transact-SQL)](../../t-sql/functions/lead-transact-sql.md)|
28-
|[FIRST_VALUE (Transact-SQL)](../../t-sql/functions/first-value-transact-sql.md)|[PERCENTILE_CONT (Transact-SQL)](../../t-sql/functions/percentile-cont-transact-sql.md)|
29-
|[LAG (Transact-SQL)](../../t-sql/functions/lag-transact-sql.md)|[PERCENTILE_DISC (Transact-SQL)](../../t-sql/functions/percentile-disc-transact-sql.md)|
30-
|[LAST_VALUE (Transact-SQL)](../../t-sql/functions/last-value-transact-sql.md)|[PERCENT_RANK (Transact-SQL)](../../t-sql/functions/percent-rank-transact-sql.md)|
31-
32-
## See Also
33-
[OVER Clause (Transact-SQL)](../../t-sql/queries/select-over-clause-transact-sql.md)
34-
35-
23+
SQL Server supports the following analytic functions. Analytic functions compute an aggregate value based on a group of rows. However, unlike aggregate functions, they can return multiple rows for each group. You can use analytic functions to compute moving averages, running totals, percentages or top-N results within a group.
24+
25+
|||
26+
|-|-|
27+
|[CUME_DIST (Transact-SQL)](../../t-sql/functions/cume-dist-transact-sql.md)|[LEAD (Transact-SQL)](../../t-sql/functions/lead-transact-sql.md)|
28+
|[FIRST_VALUE (Transact-SQL)](../../t-sql/functions/first-value-transact-sql.md)|[PERCENTILE_CONT (Transact-SQL)](../../t-sql/functions/percentile-cont-transact-sql.md)|
29+
|[LAG (Transact-SQL)](../../t-sql/functions/lag-transact-sql.md)|[PERCENTILE_DISC (Transact-SQL)](../../t-sql/functions/percentile-disc-transact-sql.md)|
30+
|[LAST_VALUE (Transact-SQL)](../../t-sql/functions/last-value-transact-sql.md)|[PERCENT_RANK (Transact-SQL)](../../t-sql/functions/percent-rank-transact-sql.md)|
31+
32+
## See also
33+
[OVER Clause (Transact-SQL)](../../t-sql/queries/select-over-clause-transact-sql.md)
34+
35+

docs/t-sql/functions/app-name-transact-sql.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "APP_NAME (Transact-SQL) | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "03/15/2017"
4+
ms.date: "07/24/2017"
55
ms.prod: "sql-non-specified"
66
ms.reviewer: ""
77
ms.suite: ""
@@ -29,32 +29,32 @@ manager: "jhubbard"
2929
# APP_NAME (Transact-SQL)
3030
[!INCLUDE[tsql-appliesto-ss2008-asdb-xxxx-xxx_md](../../includes/tsql-appliesto-ss2008-asdb-xxxx-xxx-md.md)]
3131

32-
Returns the application name for the current session if set by the application.
32+
Returns the application name for the current session if set by the application.
3333

3434
> [!IMPORTANT]
3535
> The application name is provided by the client and is not verified in any way. Do not use **APP_NAME** as part of a security check.
3636
37-
![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)
37+
![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)
3838

3939
## Syntax
4040

41-
```
41+
```sql
4242

4343
APP_NAME ( )
4444
```
4545

4646
## Return Types
47-
**nvarchar(128)**
47+
**nvarchar(128)**
4848

4949
## Remarks
50-
Use **APP_NAME** when you want to perform different actions for different applications. For example, formatting a date differently for different applications, or returning an informational message to certain applications.
50+
Use **APP_NAME** when you want to perform different actions for different applications. For example, formatting a date differently for different applications, or returning an informational message to certain applications.
5151

52-
To set an application name in [!INCLUDE[ssManStudio](../../includes/ssmanstudio-md.md)], in the **Connect to Database Engine** dialog box, click **Options**. On the **Additional Connection Parameters** tab, provide an **app** attribute in the format `;app='application_name'`
52+
To set an application name in [!INCLUDE[ssManStudio](../../includes/ssmanstudio-md.md)], in the **Connect to Database Engine** dialog box, click **Options**. On the **Additional Connection Parameters** tab, provide an **app** attribute in the format `;app='application_name'`
5353

5454
## Examples
55-
The following example checks whether the client application that initiated this process is a `SQL Server Management Studio` session and provides a date in either US or ANSI format.
55+
The following example checks whether the client application that initiated this process is a `SQL Server Management Studio` session and provides a date in either US or ANSI format.
5656

57-
```
57+
```sql
5858
USE AdventureWorks2012;
5959
GO
6060
IF APP_NAME() = 'Microsoft SQL Server Management Studio - Query'
@@ -64,8 +64,8 @@ PRINT 'This process was started by ' + APP_NAME() + '. The date is ' + CONVERT (
6464
GO
6565
```
6666

67-
## See Also
68-
[System Functions (Transact-SQL)](../../relational-databases/system-functions/system-functions-for-transact-sql.md)
69-
[Functions](../../t-sql/functions/functions.md)
67+
## See also
68+
[System Functions (Transact-SQL)](../../relational-databases/system-functions/system-functions-for-transact-sql.md)
69+
[Functions](../../t-sql/functions/functions.md)
70+
7071

71-

0 commit comments

Comments
 (0)