| Property | Value |
|---|---|
| Name | ufn_SalesByStore |
| ID | 455672671 |
| Schema | Sales |
| Owner | dbo |
| Execute As | Caller |
| Type | SQL INLINE TABLE VALUED FUNCTION |
| Uses Ansi Nulls |
|
| Uses Quoted Identifier |
|
| Is Schema Bound |
|
| Uses Database Collation |
|
| Null on Null Input |
|
| Encrypted |
|
| MS Shipped |
|
| Published |
|
| Schema Published |
|
| Deterministic |
|
| Precise |
|
| System Verified |
|
| System Data Access |
|
| User Data Access |
|
| Modify Date | 12/21/2010 5:27:26 AM |
| Creation Date | 12/21/2010 5:27:26 AM |
| Name | Value |
|---|---|
| MS_Description | aggregate function - mobi mobi czwartek |
| Parameter Name | Datatype | Has Default Value | Default Value | Read Only | Xml Document | Description |
|---|---|---|---|---|---|---|
| @storeid | int |
|
|
|
| Script |
|---|
| SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE FUNCTION Sales.ufn_SalesByStore (@storeid int) RETURNS TABLE AS RETURN ( SELECT P.ProductID, P.Name, SUM(SD.LineTotal) AS 'YTD Total' FROM Production.Product AS P JOIN Sales.SalesOrderDetail AS SD ON SD.ProductID = P.ProductID JOIN Sales.SalesOrderHeader AS SH ON SH.SalesOrderID = SD.SalesOrderID WHERE SH.CustomerID = @storeid GROUP BY P.ProductID, P.Name ); EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'aggregate function - mobi mobi czwartek' , @level0type=N'SCHEMA',@level0name=N'Sales', @level1type=N'FUNCTION',@level1name=N'ufn_SalesByStore' |