I can not get this SQL to work, can anyone spot it?

SELECT
    [Stock Conversion Items].SCID,
    [Stock Conversion Items].[Result PC],
    [Stock Conversion Items].[Quantity],
    [Stock Conversion].[Date],
    [products/stock].[Description]
FROM
    [Stock Conversion Items]
INNER JOIN [Stock Conversion]
    ON [Stock Conversion Items].SCID = [Stock Conversion].SCID
INNER JOIN [products/stock]
    ON [Stock Conversion Items].[Result PC] = [products/stock].[Product Code]
ORDER BY [Stock Conversion Items].SCID;

This code is pretty self explanatory, basically I get a syntax operator error that I can’t solve at all.

Reformated the query a bit, and got it looking like this:

SELECT sci.SCID, sci.[Result PC], sci.Quantity, sci.Date, s.Description
FROM [Stock Conversion Items] sci
INNER JOIN [Stock Conversion] sc
   ON sci.SCID = sc.SCID
INNER JOIN [products/stock] s
   ON sci.[Result PC] = s.[Product Code]
ORDER BY sci.SCID;

The only thing that can fail in that statement are the on
clauses. Are you sure that both SCID columns are of the same type, as well as the [Result PC] and [Product Code] columns?

Hello, buddy!稿源:Hello, buddy! (源链) | 关于 | 阅读提示

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 后端存储 » I can not get this SQL to work, can anyone spot it?

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录