Skip to content

Commit f84762d

Browse files
authored
Merge pull request #5112 from icoric/patch-29
Update odbc-scalar-functions-transact-sql.md
2 parents 769c857 + 806837a commit f84762d

1 file changed

Lines changed: 19 additions & 20 deletions

File tree

docs/t-sql/functions/odbc-scalar-functions-transact-sql.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-s
103103

104104
```
105105
CREATE PROCEDURE dbo.ODBCprocedure
106-
(
107-
@string_exp nvarchar(4000)
108-
)
106+
(
107+
@string_exp NVARCHAR(4000)
108+
)
109109
AS
110110
SELECT {fn OCTET_LENGTH( @string_exp )};
111111
```
@@ -115,13 +115,13 @@ SELECT {fn OCTET_LENGTH( @string_exp )};
115115

116116
```
117117
CREATE FUNCTION dbo.ODBCudf
118-
(
119-
@string_exp nvarchar(4000)
120-
)
121-
RETURNS int
118+
(
119+
@string_exp NVARCHAR(4000)
120+
)
121+
RETURNS INT
122122
AS
123123
BEGIN
124-
DECLARE @len int
124+
DECLARE @len INT
125125
SET @len = (SELECT {fn OCTET_LENGTH( @string_exp )})
126126
RETURN(@len)
127127
END ;
@@ -150,7 +150,7 @@ SELECT {fn CURRENT_DATE( )};
150150
SELECT {fn CURRENT_TIME(6)};
151151
-- Returns 10:27:11.973000
152152
153-
DECLARE @date_exp nvarchar(30) = '2007-04-21 01:01:01.1234567';
153+
DECLARE @date_exp NVARCHAR(30) = '2007-04-21 01:01:01.1234567';
154154
SELECT {fn DAYNAME( @date_exp )};
155155
-- Returns Saturday
156156
SELECT {fn DAYOFMONTH( @date_exp )};
@@ -178,9 +178,9 @@ SELECT {fn WEEK( @date_exp )};
178178

179179
```
180180
CREATE PROCEDURE dbo.ODBCprocedure
181-
(
182-
@string_exp nvarchar(4000)
183-
)
181+
(
182+
@string_exp NVARCHAR(4000)
183+
)
184184
AS
185185
SELECT {fn BIT_LENGTH( @string_exp )};
186186
```
@@ -190,13 +190,13 @@ SELECT {fn BIT_LENGTH( @string_exp )};
190190

191191
```
192192
CREATE FUNCTION dbo.ODBCudf
193-
(
194-
@string_exp nvarchar(4000)
195-
)
196-
RETURNS int
193+
(
194+
@string_exp NVARCHAR(4000)
195+
)
196+
RETURNS INT
197197
AS
198198
BEGIN
199-
DECLARE @len int
199+
DECLARE @len INT
200200
SET @len = (SELECT {fn BIT_LENGTH( @string_exp )})
201201
RETURN(@len)
202202
END ;
@@ -210,7 +210,7 @@ SELECT dbo.ODBCudf('Returns the length in bits.');
210210
The following SELECT statements use ODBC functions:
211211

212212
```
213-
DECLARE @string_exp nvarchar(4000) = 'Returns the length.';
213+
DECLARE @string_exp NVARCHAR(4000) = 'Returns the length.';
214214
SELECT {fn BIT_LENGTH( @string_exp )};
215215
-- Returns 304
216216
@@ -221,7 +221,7 @@ SELECT {fn CURRENT_DATE( )};
221221
SELECT {fn CURRENT_TIME(6)};
222222
-- Returns the time
223223
224-
DECLARE @date_exp nvarchar(30) = '2007-04-21 01:01:01.1234567';
224+
DECLARE @date_exp NVARCHAR(30) = '2007-04-21 01:01:01.1234567';
225225
SELECT {fn DAYNAME( @date_exp )};
226226
-- Returns Saturday
227227
SELECT {fn DAYOFMONTH( @date_exp )};
@@ -244,4 +244,3 @@ SELECT {fn WEEK( @date_exp )};
244244

245245
## See Also
246246
[Built-in Functions (Transact-SQL)](~/t-sql/functions/functions.md)
247-

0 commit comments

Comments
 (0)