Hi @Laura Ijewere ,
Actually you used two SELECTs in one statement which would cause 'The multi-part identifier "" could not be bound.' error.
Please have a try with below query and let us know if any more error is reported.
INSERT INTO [dbo].[FinalReportSource] (
[Row Id]
,[order id]
,[Order Date]
,[Date]
,[Ship Mode]
,[customer Id]
,[Customer Name]
,[Gender]
,[MaritalStatus]
,[Age]
,[Numberofchildren]
,[Segment]
,[Country]
,[City]
,[State]
,[Postal Code]
,[Region]
,[EmployeeID]
,[Person]
,[Type]
,[Weekly]
,[product Id]
,[Category]
,[SubCategory]
,[ProductName]
,[sales]
,[Quantity]
,[Discount]
)
SELECT top 1 [Row Id]
,od.[order id]
,od.[Order Date]
,od.[Date] AS ShipDate
,od.[Ship Mode]
,od.[customer Id]
,cd.[Customer Name]
,pd.[Gender]
,pd.[MaritalStatus]
,pd.[Age]
,pd.[Numberofchildren]
,cd.[Segment]
,cd.[Country]
,cd.[City]
,cd.[State]
,cd.[Postal Code]
,od.[Region]
,wd.[EmployeeID]
,wd.[Person]
,wd.[Type]
,wd.[Weekly]
,dp.[ProductID]
,dp.[Category]
,dp.[SubCategory]
,dp.[ProductName]
,od.[sales]
,od.[Quantity]
,od.[Discount]
FROM [dbo].[weeklyorghierarchydestination] AS WD
JOIN [dbo].[CustomerDestination] AS cd ON wd.Region = cd.[Region]
JOIN [dbo].[PersonalInfoDestination] AS Pd ON cd.[Customer ID] = Pd.[CustomerID]
JOIN [dbo].[orderdetailsDestinations] AS Od ON pd.[CustomerID] = Od.[customer Id]
JOIN [dbo].[Dimproduct] AS Dp ON od.[product Id] = Dp.ProductID
Best regards
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.