Skip to content

Commit 7576758

Browse files
authored
Merge pull request #21416 from jovanpop-msft/patch-42
Clarified what is supported
2 parents 63cfceb + bd2d192 commit 7576758

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

docs/t-sql/statements/create-function-sql-data-warehouse.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ monikerRange: ">= aps-pdw-2016 || = azure-sqldw-latest"
3737
## Syntax
3838

3939
```syntaxsql
40-
-- Transact-SQL Scalar Function Syntax (in Azure Synapse Analytics and Parallel Data Warehouse)
40+
-- Transact-SQL Scalar Function Syntax (in dedicated pools in Azure Synapse Analytics and Parallel Data Warehouse)
41+
-- Not available in the serverless SQL pools in Azure Synapse Analytics
4142
CREATE FUNCTION [ schema_name. ] function_name
4243
( [ { @parameter_name [ AS ] parameter_data_type
4344
[ = default ] }
@@ -59,11 +60,11 @@ RETURNS return_data_type
5960
| [ RETURNS NULL ON NULL INPUT | CALLED ON NULL INPUT ]
6061
}
6162
```
62-
> [!NOTE]
63-
> [!INCLUDE[synapse-analytics-od-unsupported-syntax](../../includes/synapse-analytics-od-unsupported-syntax.md)]
6463

6564
```syntaxsql
66-
-- Transact-SQL Inline Table-Valued Function Syntax (Preview in Azure Synapse Analytics only)
65+
-- Transact-SQL Inline Table-Valued Function Syntax
66+
-- Preview in dedicated SQL pools in Azure Synapse Analytics
67+
-- Available in the serverless SQL pools in Azure Synapse Analytics
6768
CREATE FUNCTION [ schema_name. ] function_name
6869
( [ { @parameter_name [ AS ] parameter_data_type
6970
[ = default ] }
@@ -215,9 +216,12 @@ GO
215216
SELECT dbo.ConvertInput(15) AS 'ConvertedValue';
216217
```
217218

219+
> [!NOTE]
220+
> Scalar functions are not available in the serverless SQL pools.
221+
218222
## Examples: [!INCLUDE[ssSDWfull](../../includes/sssdwfull-md.md)]
219223

220-
### A. Creating an inline table-valued function (preview)
224+
### A. Creating an inline table-valued function
221225
The following example creates an inline table-valued function to return some key information on modules, filtering by the `objectType` parameter. It includes a default value to return all modules when the function is called with the DEFAULT parameter. This example makes use of some of the system catalog views mentioned in [Metadata](#metadata).
222226

223227
```sql
@@ -244,7 +248,10 @@ The function can then be called to return all view (**V**) objects with:
244248
select * from dbo.ModulesByType('V');
245249
```
246250

247-
### B. Combining results of an inline table-valued function (preview)
251+
> [!NOTE]
252+
> Inline table-value functions are available in the serverless SQL pools, but in preview in the dedicated SQL pools.
253+
254+
### B. Combining results of an inline table-valued function
248255
This simple example uses the previously created inline TVF to demonstrate how its results can be combined with other tables using cross apply. Here, we select all columns from both sys.objects and the results of `ModulesByType` for all rows matching on the *type* column. For more details on using apply, see [FROM clause plus JOIN, APPLY, PIVOT](../../t-sql/queries/from-transact-sql.md).
249256

250257
```sql
@@ -253,7 +260,10 @@ FROM sys.objects o
253260
CROSS APPLY dbo.ModulesByType(o.type);
254261
GO
255262
```
256-
263+
264+
> [!NOTE]
265+
> Inline table-value functions are available in the serverless SQL pools, but in preview in the dedicated SQL pools.
266+
257267
## See also
258268
[ALTER FUNCTION (SQL Server PDW)](/previous-versions/sql/)
259269
[DROP FUNCTION (SQL Server PDW)](/previous-versions/sql/)

0 commit comments

Comments
 (0)