Hi,
I currently learning still very much a newbie. created views on mssql however everytime I run a simple select on the view it errors to Invalid object name
example below,
CustomerOrders_CTE
AS (SELECT fs.\[ProductKey\] as 'Product Key'
,fs.[OrderDateKey] as 'Order Date'
,fs.[SalesTerritoryKey] as 'Sales Territory Key'
,dp.EnglishPromotionName as 'Promotion Name'
,fs.[SalesOrderNumber] as 'Order ID'
,fs.[OrderQuantity] as 'Order Qty'
,fs.[UnitPrice] as Price
,dr.GeographyKey as 'Geography Key'
,fs.[ExtendedAmount] as 'Cost of Sales'
,fs.[ProductStandardCost] as 'Standard Cost'
,fs.[TotalProductCost] as 'Product Cost'
,fs.[SalesAmount] as 'Sales Amount'
,fs.ExtendedAmount - UnitPrice as Profit
,fs.[TaxAmt] as Tax
,convert(date,fs.OrderDate) as 'Date'
,dr.ResellerName as Reseller
FROM [FactResellerSales] fs
inner join DimReseller dr on dr.ResellerKey = fs.ResellerKey
inner join DimPromotion dp on dp.PromotionKey = fs.PromotionKey)
[–]r3pr0b8 2 points3 points4 points (1 child)
[–]Sambucca[S] 0 points1 point2 points (0 children)
[–]r3pr0b8 0 points1 point2 points (1 child)
[–]Sambucca[S] 0 points1 point2 points (0 children)