OLE DB error: OLE DB or ODBC error: The column prefix 'dbo.Products' does not match with a table name or alias name used

Last Post 29 Aug 2007 04:38 AM by JASBRYDEN. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
JASBRYDEN
New Member
New Member

--
28 Aug 2007 12:15 PM
Hi Below is the code that I have

However I getting an error on line 22

AS [dbo_SalesASB],[dbo].[vwTime] AS [dbo_vwTime]


The syntax for ',' is incorrect.


Could someone help me please !!!


SELECT [dbo_SalesASB].[QtyOrdered] AS [dbo_SalesASBQtyOrdered0_0],[dbo_SalesASB].[QtyShipped] AS [dbo_SalesASBQtyShipped0_1],[dbo_SalesASB].[QtyReturned] AS [dbo_SalesASBQtyReturned0_2],[dbo_SalesASB].[CostAmount] AS [dbo_SalesASBCostAmount0_3],[dbo_SalesASB].[SaleAmount] AS [dbo_SalesASBSaleAmount0_4],[dbo_SalesASB].[Profit$] AS [dbo_SalesASBProfit_x0024_0_5],[dbo_SalesASB].[CompanyNo] AS [dbo_SalesASBCompanyNo0_6],[dbo_SalesASB].[CustomerID] AS [dbo_SalesASBCustomerID0_7],[dbo_SalesASB].[OrderNo] AS [dbo_SalesASBOrderNo0_8],[dbo_SalesASB].[BackOrderCode] AS [dbo_SalesASBBackOrderCode0_9],[dbo_SalesASB].[OrderLineNo] AS [dbo_SalesASBOrderLineNo0_10],[dbo_SalesASB].[ItemID] AS [dbo_SalesASBItemID0_11],[dbo_SalesASB].[SalesLocation] AS [dbo_SalesASBSalesLocation0_12],[dbo_SalesASB].[SalespersonNo] AS [dbo_SalesASBSalespersonNo0_13],[dbo_vwTime].[DateGregorian] AS [dbo_vwTimeDateGregorian3_0],[dbo_Products_RedBull].[VendorID] AS [dbo_Products_RedBullVendorID5_1],[dbo_SalesASBadd].[OrderSourceCode] AS [dbo_SalesASBaddOrderSourceCode11_0],[dbo_SalesASBadd].[CreditCode] AS [dbo_SalesASBaddCreditCode11_2]
FROM
(

SELECT "QtyOrdered", "QtyShipped", "QtyReturned", "CostAmount", "SaleAmount", "Profit$", "CompanyNo", "CustomerID", "ItemID", "InvoiceDate", "SalesLocation", "OrderNo", "BackOrderCode", "OrderLineNo", "SalespersonNo" FROM SalesASB WHERE dbo.Products.DivisionNo = '3'
)
AS [dbo_SalesASB],[dbo].[vwTime] AS [dbo_vwTime],[dbo].[Products_RedBull] AS [dbo_Products_RedBull],[dbo].[SalesASBadd] AS [dbo_SalesASBadd]
WHERE
(

(
[dbo_SalesASB].[CompanyNo] = [dbo_Products_RedBull].[CompanyNo]
)
AND
(
[dbo_SalesASB].[ItemID] = [dbo_Products_RedBull].[Sku]
)
AND
(
[dbo_SalesASB].[CompanyNo] = [dbo_SalesASBadd].[CompanyNo]
)
AND
(
[dbo_SalesASB].[OrderNo] = [dbo_SalesASBadd].[OrderNo]
)
AND
(
[dbo_SalesASB].[BackOrderCode] = [dbo_SalesASBadd].[BackOrderCode]
)
AND
(
[dbo_SalesASB].[OrderLineNo] = [dbo_SalesASBadd].[OrderLineNo]
)
AND
(
[dbo_SalesASB].[InvoiceDate] = [dbo_vwTime].[MacolaDate]
)

)
JASBRYDEN
New Member
New Member

--
29 Aug 2007 04:38 AM
Yes that is the error when I am trying to run the query.

It is giving an error where I have the AS on


AS [dbo_SalesASB],[dbo].[vwTime] AS [dbo_vwTime],[dbo].[Products_RedBull] AS [dbo_Products_RedBull],[dbo].[SalesASBadd] AS [dbo_SalesASBadd]


The syntax for ',' is incorrect.


I do not understand why
You are not authorized to post a reply.

Acceptable Use Policy