0% found this document useful (0 votes)
10 views17 pages

Base Orders View

The document contains SQL code to create a view named [dbo].[v_Orders] in the Alteryx_Staging database. This view consolidates various sales order details from the dbo.TABLEAU_ORDERS table, including fields such as Sales Document, Customer Information, Delivery Status, and Financial Data. The view is designed to facilitate reporting and analysis by combining data from multiple sources into a single structure.

Uploaded by

hitesh.sap8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views17 pages

Base Orders View

The document contains SQL code to create a view named [dbo].[v_Orders] in the Alteryx_Staging database. This view consolidates various sales order details from the dbo.TABLEAU_ORDERS table, including fields such as Sales Document, Customer Information, Delivery Status, and Financial Data. The view is designed to facilitate reporting and analysis by combining data from multiple sources into a single structure.

Uploaded by

hitesh.sap8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

USE [Alteryx_Staging]

GO

/****** Object: View [dbo].[v_Orders] Script Date: 7/12/2022 3:49:17 PM ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE VIEW [dbo].[v_Orders]

AS

SELECT [/BIC/ZDOC_NUM] AS [Sales Document], [/BIC/ZITEM] AS [Sales Document Line Item],


[/BIC/ZSRCSYSTM] AS [Source System ID Key], [/BIC/ZSRCSYSDE] AS [Source System Description], CH_ON
AS [Changed On Date],

FISCPER AS [Fiscal year / period], FISCYEAR AS [Fiscal year], [/BIC/ZFSCQTR] AS [Fiscal


Quarter], [/BIC/ZOCEDATU] AS [Original Confirmed Date], [/BIC/ZWEDATU] AS [Customer Want Date],

REQ_DATE AS [Schedule line delivery date], CREATEDON AS [Created On],


[/BIC/ZHDRCREDT] AS [Header Created On], [/BIC/ZBSTDK] AS [Customer PO Date], AEDAT AS [Last
Changed On Date],

AA_DEACT AS [Deactivation Date], PLANT AS Plant, [/BIC/ZPLANTTXT] AS [Plant


Description], PROFIT_CTR AS [Profit Center], [/BIC/ZPRFTTXT] AS [Profit Center Description],
COMP_CODE AS [Company code],

REF_DOC_NO AS [Reference document number], REFER_ITM AS [Item number of the


reference item], DOC_CATEG AS [Sales Document Category], DOC_TYPE AS [Sales document type],

[/BIC/ZDOCTYPE] AS [Sales Document Type Text], ITEM_DEL AS [Item Deleted Flag],


REJECTN_ST AS [Line Rejection Status], DLV_STS AS [Delivery Status], SALESORG AS [Sales Organization],

[/BIC/ZSALTEXT] AS [Sales Org description], DIVISION AS Division, [/BIC/ZDIVISDE] AS


[Division Description], SALES_OFF AS [Sales Office], [/BIC/ZSAOFFDE] AS [Sales Office description],
SALES_GRP AS [Sales Group],

[/BIC/ZVKGRPDE] AS [Sales Group Description], FORWAGENT AS [Forw.Agent],


CUST_GROUP AS [Customer Group], [/BIC/ZCUSTGRPT] AS [Customer Group Description], [/BIC/ZBSTNK]
AS [Customer purchase order number],
[/BIC/ZPOSEX] AS [Customer PO Line Number], [/BIC/ZCUSPOTYP] AS [Customer purchase
order type], [/BIC/ZCUSPOTYT] AS [Customer purchase order type text], [/BIC/ZCUSTMAT] AS [Customer
Material Number],

ORD_REASON AS [Order reason], CSM_CRBY AS [Created By], QUOT_FROM AS [Quotation


valid From], QUOT_TO AS [Quotation valid To], BILL_BLOCK AS [Billing Block], DEL_BLOCK AS [Delivery
Block],

[/BIC/ZINCO1] AS Incoterms1, [/BIC/ZINCO2] AS Incoterms2, [/BIC/ZVERSION] AS [SD


Version], COMPL_DEL AS [Delivery Completed Indicator], PARTIALDLV AS [Partial Delivery Status],
[/BIC/ZZTERM] AS [Payment Terms],

[/BIC/ZLEADDAY] AS [Lead Days], [/BIC/ZSFLINEST] AS [Sales Order Line Status],


[/BIC/ZACTSHPDT] AS [Actual Ship Date], [/BIC/ZSRCMFG] AS [Manufacturing Source], [/BIC/ZSFPROJT]
AS Project,

[/BIC/ZSFAPRVFG] AS [Approved Flag], [/BIC/ZCLOSERSN] AS [Quotes Close Reasons],


[/BIC/ZSFCLSRSN] AS [Close Reason], ACN_EANUPC AS [European Article Number], ACN_CATGRY AS
Category, RMA_FLAG AS [RMA Flag],

[/BIC/ZSOLD_TO] AS [Sold To Customer ID], [/BIC/ZEXCUST] AS [Sold To Customer Name],


[/BIC/ZSHIPTONM] AS [Ship To Customer Name], [/BIC/ZEXPO] AS [Customer purchase order number
ZEXPO],

SHIP_TO AS [Ship To Party ID], BILLTOPRTY AS [Bill To Party ID], CUST_GROUP AS


[Customer Group ID], CUST_GRP1 AS [Customer Group ID1], [/BIC/ZLAND1] AS [Country Key ID],
[/BIC/ZCNTRYNME] AS [Country Name],

[/BIC/ZCONTCNAM] AS [Partner Contact Name], [/BIC/ZPHONENO] AS [Partner Contact


Phone Number], REGION AS [Region (State, Province, County)], POSTAL_CD AS [Postal Code], COUNTRY
AS [Country Key],

[/BIC/ZSHIPCITY] AS [Ship To Customer City], [/BIC/ZCUSCGRP1] AS [Customer A/B


Classification(As-Is)], [/BIC/ZCUSCGRP2] AS [Customer A/B Classification(As-Was)], [/BIC/ZUSERSTS] AS
[User Status],

[/BIC/ZSFDCCUST] AS [SFDC Customer Account], [/BIC/ZSFACCSTS] AS [Account Status],


[/BIC/ZSFNAME1] AS [Customer Name], [/BIC/ZSFNAME2] AS [Immediate Parent Customer Name],
[/BIC/ZSFBRNHID] AS [Branch ID],

[/BIC/ZSFGRPNAM] AS [Group Name], [/BIC/ZCITY] AS City, [/BIC/ZADDRESS1] AS [Address


Line ID], [/BIC/ZADDRESS2] AS [Address Line ID2], [/BIC/ZSFCNTRCD] AS [Country Code],

[/BIC/ZSFACCTYP] AS [Account Type (Channel)], [/BIC/ZSFINDSEG] AS Industry,


[/BIC/ZSFSINDSG] AS [Sub-Industry], [/BIC/ZSFRECTYP] AS [Strategic Account], [/BIC/ZSFSTRGST] AS
[Strategic Site],

[/BIC/ZSFTRLBLZ] AS Trailblazer, [/BIC/ZSFINTIVE] AS Initiative, [/BIC/ZSFPRNTID] AS


[Parent Account ID], [/BIC/ZSFREGID] AS [Region ID], [/BIC/ZSFOWNRID] AS [Owner ID], [/BIC/ZSFCNTRY]
AS Country,
[/BIC/ZSFPRVNC] AS [State Province/Region], [/BIC/ZSFSTSRG] AS [Sold - To Sub-Region],
[/BIC/ZSFSAPVID] AS [SAP Vendor ID], [/BIC/ZSFHFMIND] AS [HFM-Industry], [/BIC/ZSFHFMCHN] AS
[Finance Channel],

[/BIC/ZSFSUBTYP] AS [Account Sub Type], [/BIC/ZSFVRTCL] AS [Industry Vertical],


[/BIC/ZSFSECTOR] AS [Industry Sector], [/BIC/ZSF_CCLS] AS [Customer ID], [/BIC/ZSFSTCLS] AS [Strategic
Classification],

[/BIC/ZSFDCID] AS [SFDC Account ID], [/BIC/ZSFSTREG] AS [Sold To Region ID],


[/BIC/ZSFHSTREG] AS [Sold To HFM Region], [/BIC/ZSFSTRGAC] AS [Strategic Account Flag],
[/BIC/ZSFHFMREG] AS [HFM-Region],

[/BIC/ZSFREGION] AS Region, [/BIC/ZSFULPRT] AS [SFDC Ultimate Parent ID],


[/BIC/ZSFPNAME] AS [SFDC Ultimate Parent Name], FLAG AS Flag, PROD_HIER AS [SAP Product
Hierarchy],

[/BIC/ZPRDHRDW] AS [Global Product Hierarchy], [/BIC/ZSFMATRL] AS [Material ID],


[/BIC/ZPRODDESC] AS [Material Description], MATL_GROUP AS [Material group ID], [/BIC/ZMATLGRPT]
AS [Material Group Description],

[/BIC/ZSFCOSTFL] AS [Material Cost Provided Flag], MATL_TYPE AS [Material type],


[/BIC/ZPRODSTAT] AS [Material A/B Classification(As-IS)], [/BIC/ZPRODSTA2] AS [Material A/B
Classification(As-Was)],

[/BIC/ZPRD_GRP] AS [DW Product Group], [/BIC/ZPRDFMLY] AS [Product Family (L2)],


[/BIC/ZPRDLINE] AS [Product Line (L3)], [/BIC/ZPRDGPDSC] AS [Product Group Description],

[/BIC/ZPRDFMDSC] AS [Product Family Description], [/BIC/ZPRDLNDSC] AS [Product Line


Description], [/BIC/ZPRODH4TX] AS [SAP PH Level 4 Text], [/BIC/ZPRODH5TX] AS [SAP PH Level 5 Text],

SUBTOTAL_1 AS [Condition Subtotal 1 from Pricing Procedure], SUBTOTAL_2 AS [Condition


Subtotal 2 from Pricing Procedure], COST AS [Cost in document currency], CML_OR_QTY AS [Cumulative
order quantity in sales units],

CML_CF_QTY AS [Cumulative confirmed quantity in sales unit], CML_CD_QTY AS


[Cumulative confirmed quantity in base unit], TAX_AMOUNT AS [Tax amount in document currency],
PRICE_UNIT AS [Price unit],

DLV_QTY AS [Actual quantity delivered (in sales units)], DEL_VAL AS [Delivered Sales Order
Net Value], OP_DOC_ITM AS [Number of Open Order Items], OPENORDQTY AS [Open orders quantity in
base unit of measure],

NET_PRICE AS [Net price], NETPR_VKM AS [Net Price per 1*VKME], OPENORDVAL AS [Net
value of open orders], NET_VALUE AS [Net value of the order item in document currency],
[/BIC/ZPLCHGVAL] AS [Plant Change Value],

[/BIC/ZPRCHGVAL] AS [Prod Hier Change Value], [/BIC/ZPCCHGVAL] AS [Profit Center


Change Value], [/BIC/ZNETVALBG] AS [Net Value in USD (Budget Rate)], [/BIC/ZPCVAL_BG] AS [Profit
Center Change Val USD BG],
[/BIC/ZPRVAL_BG] AS [Prod Hier Change Value USD BG], [/BIC/ZSALEUNIT] AS [Global Sales
Unit], DOC_CURRCY AS [Document currency], BASE_UOM AS [Base Unit of Measure], UPDATED_BY,
UPDATED_AT,

Food_PH_Flag AS [Food PH Flag], Discrete_Material_Food_Segment_Flag AS [Discrete


Material Food Segment Flag], VC_Material_Food_Segment_Flag AS [VC Material Food Segment Flag],

Food_Segment_Flag AS [Food Segment Flag], SO_Description_Food_Flag AS [SO


Description Food Flag], Segment_Team AS [Segment Team], Finance_Vertical AS [Finance Vertical],
Finance_Vertical_L2 AS [Finance Vertical L2],

[Working Days EOM], [Working Days MTD], [Segment I/E], [Edge Device], [Owner Name],
[SFDC_Sales_Segmentation] AS [SFDC Sales Segmentation], FISCAL_YEAR_OLD AS [Fiscal Year Old],

FISCAL_YEAR_PERIOD_OLD AS [Fiscal Year Period Old], FISCAL_QUARTER_OLD AS [Fiscal


Quarter Old], [Delivering Plant], [Delivering Plant Description], [CY21 Quota Growth Rate],

[Active Initiatives Numbers] AS [Active Initiatives Numbers Read only], [PTS PH L1], [PTS PH
L2], [PTS PH L3], [PTS PH L4], [PTS PH L5], [PTS Product Hierarchy L1 Text], [PTS Product Hierarchy L2
Text],

[PTS Product Hierarchy L3 Text], [PTS Product Hierarchy L4 Text], [PTS Product Hierarchy
L5 Text], [Sales Representative Name], [SFDC Territory ID], [Sales Region], [PTS Customer Classification],
[PTS Product Classification],

[MCS Product Hierarchy], [MCS Product Group Code], [MCS Product Family Code], [MCS
Product Line Code], [MCS Product Group Description], [MCS Product Family Description], [MCS Product
Line Description],

[PTS Order Mode Text],[PTS Fiscal year],[PTS Fiscal year period],[PTS Fiscal Year quarter],
[PTS Fiscal Quarter]

FROM dbo.TABLEAU_ORDERS

UNION ALL

SELECT [/BIC/ZDOC_NUM] AS [Sales Document], [/BIC/ZITEM] AS [Sales Document Line Item],


[/BIC/ZSRCSYSTM] AS [Source System ID Key], [/BIC/ZSRCSYSDE] AS [Source System Description], CH_ON
AS [Changed On Date],

FISCPER AS [Fiscal year / period], FISCYEAR AS [Fiscal year], [/BIC/ZFSCQTR] AS [Fiscal


Quarter], [/BIC/ZOCEDATU] AS [Original Confirmed Date], [/BIC/ZWEDATU] AS [Customer Want Date],

REQ_DATE AS [Schedule line delivery date], CREATEDON AS [Created On],


[/BIC/ZHDRCREDT] AS [Header Created On], [/BIC/ZBSTDK] AS [Customer PO Date], AEDAT AS [Last
Changed On Date],

AA_DEACT AS [Deactivation Date], PLANT AS Plant, [/BIC/ZPLANTTXT] AS [Plant


Description], PROFIT_CTR AS [Profit Center], [/BIC/ZPRFTTXT] AS [Profit Center Description],
COMP_CODE AS [Company code],
REF_DOC_NO AS [Reference document number], REFER_ITM AS [Item number of the
reference item], DOC_CATEG AS [Sales Document Category], DOC_TYPE AS [Sales document type],

[/BIC/ZDOCTYPE] AS [Sales Document Type Text], ITEM_DEL AS [Item Deleted Flag],


REJECTN_ST AS [Line Rejection Status], DLV_STS AS [Delivery Status], SALESORG AS [Sales Organization],

[/BIC/ZSALTEXT] AS [Sales Org description], DIVISION AS Division, [/BIC/ZDIVISDE] AS


[Division Description], SALES_OFF AS [Sales Office], [/BIC/ZSAOFFDE] AS [Sales Office description],
SALES_GRP AS [Sales Group],

[/BIC/ZVKGRPDE] AS [Sales Group Description], FORWAGENT AS [Forw.Agent],


CUST_GROUP AS [Customer Group], [/BIC/ZCUSTGRPT] AS [Customer Group Description], [/BIC/ZBSTNK]
AS [Customer purchase order number],

[/BIC/ZPOSEX] AS [Customer PO Line Number], [/BIC/ZCUSPOTYP] AS [Customer purchase


order type], [/BIC/ZCUSPOTYT] AS [Customer purchase order type text], [/BIC/ZCUSTMAT] AS [Customer
Material Number],

ORD_REASON AS [Order reason], CSM_CRBY AS [Created By], QUOT_FROM AS [Quotation


valid From], QUOT_TO AS [Quotation valid To], BILL_BLOCK AS [Billing Block], DEL_BLOCK AS [Delivery
Block],

[/BIC/ZINCO1] AS Incoterms1, [/BIC/ZINCO2] AS Incoterms2, [/BIC/ZVERSION] AS [SD


Version], COMPL_DEL AS [Delivery Completed Indicator], PARTIALDLV AS [Partial Delivery Status],
[/BIC/ZZTERM] AS [Payment Terms],

[/BIC/ZLEADDAY] AS [Lead Days], [/BIC/ZSFLINEST] AS [Sales Order Line Status],


[/BIC/ZACTSHPDT] AS [Actual Ship Date], [/BIC/ZSRCMFG] AS [Manufacturing Source], [/BIC/ZSFPROJT]
AS Project,

[/BIC/ZSFAPRVFG] AS [Approved Flag], [/BIC/ZCLOSERSN] AS [Quotes Close Reasons],


[/BIC/ZSFCLSRSN] AS [Close Reason], ACN_EANUPC AS [European Article Number], ACN_CATGRY AS
Category, RMA_FLAG AS [RMA Flag],

[/BIC/ZSOLD_TO] AS [Sold To Customer ID], [/BIC/ZEXCUST] AS [Sold To Customer Name],


[/BIC/ZSHIPTONM] AS [Ship To Customer Name], [/BIC/ZEXPO] AS [Customer purchase order number
ZEXPO],

SHIP_TO AS [Ship To Party ID], BILLTOPRTY AS [Bill To Party ID], CUST_GROUP AS


[Customer Group ID], CUST_GRP1 AS [Customer Group ID1], [/BIC/ZLAND1] AS [Country Key ID],
[/BIC/ZCNTRYNME] AS [Country Name],

[/BIC/ZCONTCNAM] AS [Partner Contact Name], [/BIC/ZPHONENO] AS [Partner Contact


Phone Number], REGION AS [Region (State, Province, County)], POSTAL_CD AS [Postal Code], COUNTRY
AS [Country Key],

[/BIC/ZSHIPCITY] AS [Ship To Customer City], [/BIC/ZCUSCGRP1] AS [Customer A/B


Classification(As-Is)], [/BIC/ZCUSCGRP2] AS [Customer A/B Classification(As-Was)], [/BIC/ZUSERSTS] AS
[User Status],
[/BIC/ZSFDCCUST] AS [SFDC Customer Account], [/BIC/ZSFACCSTS] AS [Account Status],
[/BIC/ZSFNAME1] AS [Customer Name], [/BIC/ZSFNAME2] AS [Immediate Parent Customer Name],
[/BIC/ZSFBRNHID] AS [Branch ID],

[/BIC/ZSFGRPNAM] AS [Group Name], [/BIC/ZCITY] AS City, [/BIC/ZADDRESS1] AS [Address


Line ID], [/BIC/ZADDRESS2] AS [Address Line ID2], [/BIC/ZSFCNTRCD] AS [Country Code],

[/BIC/ZSFACCTYP] AS [Account Type (Channel)], [/BIC/ZSFINDSEG] AS Industry,


[/BIC/ZSFSINDSG] AS [Sub-Industry], [/BIC/ZSFRECTYP] AS [Strategic Account], [/BIC/ZSFSTRGST] AS
[Strategic Site],

[/BIC/ZSFTRLBLZ] AS Trailblazer, [/BIC/ZSFINTIVE] AS Initiative, [/BIC/ZSFPRNTID] AS


[Parent Account ID], [/BIC/ZSFREGID] AS [Region ID], [/BIC/ZSFOWNRID] AS [Owner ID], [/BIC/ZSFCNTRY]
AS Country,

[/BIC/ZSFPRVNC] AS [State Province/Region], [/BIC/ZSFSTSRG] AS [Sold - To Sub-Region],


[/BIC/ZSFSAPVID] AS [SAP Vendor ID], [/BIC/ZSFHFMIND] AS [HFM-Industry], [/BIC/ZSFHFMCHN] AS
[Finance Channel],

[/BIC/ZSFSUBTYP] AS [Account Sub Type], [/BIC/ZSFVRTCL] AS [Industry Vertical],


[/BIC/ZSFSECTOR] AS [Industry Sector], [/BIC/ZSF_CCLS] AS [Customer ID], [/BIC/ZSFSTCLS] AS [Strategic
Classification],

[/BIC/ZSFDCID] AS [SFDC Account ID], [/BIC/ZSFSTREG] AS [Sold To Region ID],


[/BIC/ZSFHSTREG] AS [Sold To HFM Region], [/BIC/ZSFSTRGAC] AS [Strategic Account Flag],
[/BIC/ZSFHFMREG] AS [HFM-Region],

[/BIC/ZSFREGION] AS Region, [/BIC/ZSFULPRT] AS [SFDC Ultimate Parent ID],


[/BIC/ZSFPNAME] AS [SFDC Ultimate Parent Name], FLAG AS Flag, PROD_HIER AS [SAP Product
Hierarchy],

[/BIC/ZPRDHRDW] AS [Global Product Hierarchy], [/BIC/ZSFMATRL] AS [Material ID],


[/BIC/ZPRODDESC] AS [Material Description], MATL_GROUP AS [Material group ID], [/BIC/ZMATLGRPT]
AS [Material Group Description],

[/BIC/ZSFCOSTFL] AS [Material Cost Provided Flag], MATL_TYPE AS [Material type],


[/BIC/ZPRODSTAT] AS [Material A/B Classification(As-IS)], [/BIC/ZPRODSTA2] AS [Material A/B
Classification(As-Was)],

[/BIC/ZPRD_GRP] AS [DW Product Group], [/BIC/ZPRDFMLY] AS [Product Family (L2)],


[/BIC/ZPRDLINE] AS [Product Line (L3)], [/BIC/ZPRDGPDSC] AS [Product Group Description],

[/BIC/ZPRDFMDSC] AS [Product Family Description], [/BIC/ZPRDLNDSC] AS [Product Line


Description], [/BIC/ZPRODH4TX] AS [SAP PH Level 4 Text], [/BIC/ZPRODH5TX] AS [SAP PH Level 5 Text],

SUBTOTAL_1 AS [Condition Subtotal 1 from Pricing Procedure], SUBTOTAL_2 AS [Condition


Subtotal 2 from Pricing Procedure], COST AS [Cost in document currency], CML_OR_QTY AS [Cumulative
order quantity in sales units],
CML_CF_QTY AS [Cumulative confirmed quantity in sales unit], CML_CD_QTY AS
[Cumulative confirmed quantity in base unit], TAX_AMOUNT AS [Tax amount in document currency],
PRICE_UNIT AS [Price unit],

DLV_QTY AS [Actual quantity delivered (in sales units)], DEL_VAL AS [Delivered Sales Order
Net Value], OP_DOC_ITM AS [Number of Open Order Items], OPENORDQTY AS [Open orders quantity in
base unit of measure],

NET_PRICE AS [Net price], NETPR_VKM AS [Net Price per 1*VKME], OPENORDVAL AS [Net
value of open orders], NET_VALUE AS [Net value of the order item in document currency],
[/BIC/ZPLCHGVAL] AS [Plant Change Value],

[/BIC/ZPRCHGVAL] AS [Prod Hier Change Value], [/BIC/ZPCCHGVAL] AS [Profit Center


Change Value], [/BIC/ZNETVALBG] AS [Net Value in USD (Budget Rate)], [/BIC/ZPCVAL_BG] AS [Profit
Center Change Val USD BG],

[/BIC/ZPRVAL_BG] AS [Prod Hier Change Value USD BG], [/BIC/ZSALEUNIT] AS [Global Sales
Unit], DOC_CURRCY AS [Document currency], BASE_UOM AS [Base Unit of Measure], UPDATED_BY,
UPDATED_AT,

Food_PH_Flag AS [Food PH Flag], Discrete_Material_Food_Segment_Flag AS [Discrete


Material Food Segment Flag], VC_Material_Food_Segment_Flag AS [VC Material Food Segment Flag],

Food_Segment_Flag AS [Food Segment Flag], SO_Description_Food_Flag AS [SO


Description Food Flag], Segment_Team AS [Segment Team], Finance_Vertical AS [Finance Vertical],
Finance_Vertical_L2 AS [Finance Vertical L2],

[Working Days EOM], [Working Days MTD], [Segment I/E], [Edge Device], [Owner Name],
[SFDC_Sales_Segmentation] AS [SFDC Sales Segmentation], FISCAL_YEAR_OLD AS [Fiscal Year Old],

FISCAL_YEAR_PERIOD_OLD AS [Fiscal Year Period Old], FISCAL_QUARTER_OLD AS [Fiscal


Quarter Old], [Delivering Plant], [Delivering Plant Description], [CY21 Quota Growth Rate],

[Active Initiatives Numbers] AS [Active Initiatives Numbers Read only], [PTS PH L1], [PTS PH
L2], [PTS PH L3], [PTS PH L4], [PTS PH L5], [PTS Product Hierarchy L1 Text], [PTS Product Hierarchy L2
Text],

[PTS Product Hierarchy L3 Text], [PTS Product Hierarchy L4 Text], [PTS Product Hierarchy
L5 Text], [Sales Representative Name], [SFDC Territory ID], [Sales Region], [PTS Customer Classification],
[PTS Product Classification],

[MCS Product Hierarchy], [MCS Product Group Code], [MCS Product Family Code], [MCS
Product Line Code], [MCS Product Group Description], [MCS Product Family Description], [MCS Product
Line Description],

[PTS Order Mode Text],[PTS Fiscal year],[PTS Fiscal year period],[PTS Fiscal Year quarter],
[PTS Fiscal Quarter]

FROM dbo.TABLEAU_ORDERS_HISTORY

GO
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-
A24F-00AA00A3EFFF, 1.00]

Begin DesignProperties =

Begin PaneConfigurations =

Begin PaneConfiguration = 0

NumPanes = 4

Configuration = "(H (1[16] 4[27] 2[38] 3) )"

End

Begin PaneConfiguration = 1

NumPanes = 3

Configuration = "(H (1 [50] 4 [25] 3))"

End

Begin PaneConfiguration = 2

NumPanes = 3

Configuration = "(H (1 [50] 2 [25] 3))"

End

Begin PaneConfiguration = 3

NumPanes = 3

Configuration = "(H (4 [30] 2 [40] 3))"

End

Begin PaneConfiguration = 4

NumPanes = 2

Configuration = "(H (1 [56] 3))"

End

Begin PaneConfiguration = 5

NumPanes = 2

Configuration = "(H (2 [66] 3))"

End
Begin PaneConfiguration = 6

NumPanes = 2

Configuration = "(H (4 [50] 3))"

End

Begin PaneConfiguration = 7

NumPanes = 1

Configuration = "(V (3))"

End

Begin PaneConfiguration = 8

NumPanes = 3

Configuration = "(H (1[56] 4[18] 2) )"

End

Begin PaneConfiguration = 9

NumPanes = 2

Configuration = "(H (1 [75] 4))"

End

Begin PaneConfiguration = 10

NumPanes = 2

Configuration = "(H (1[66] 2) )"

End

Begin PaneConfiguration = 11

NumPanes = 2

Configuration = "(H (4 [60] 2))"

End

Begin PaneConfiguration = 12

NumPanes = 1

Configuration = "(H (1) )"

End

Begin PaneConfiguration = 13
NumPanes = 1

Configuration = "(V (4))"

End

Begin PaneConfiguration = 14

NumPanes = 1

Configuration = "(V (2))"

End

ActivePaneConfig = 0

End

Begin DiagramPane =

Begin Origin =

Top = 0

Left = 0

End

Begin Tables =

End

End

Begin SQLPane =

End

Begin DataPane =

Begin ParameterDefaults = ""

End

Begin ColumnWidths = 172

Width = 284

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500
Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500
Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500
Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Wi' , @level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'VIEW',@level1name=N'v_Orders'

GO

EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N'dth = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500
Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500
Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500
Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

Width = 1500

End

End

Begin CriteriaPane =

Begin ColumnWidths = 11
Column = 3165

Alias = 5415

Table = 2535

Output = 720

Append = 1400

NewValue = 1170

SortType = 1350

SortOrder = 1410

GroupBy = 1350

Filter = 1350

Or = 1350

Or = 1350

Or = 1350

End

End

End

' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_Orders'

GO

EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=2 ,


@level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_Orders'

GO

You might also like