SuperComputing
IS-IT--Management
I am attempting to join 2 tables, but for optimization purposes, I want to "filter" one of the tables down.
I posted this originally in the standard SQL forum, you can read about it here:
What I am trying is this:
And what I am getting back is this:
Any help on my syntax please...
I posted this originally in the standard SQL forum, you can read about it here:
What I am trying is this:
Code:
SELECT Items.ItemNumber, Items.Description1, ItemsMonthly.QtySold_1
FROM Items
LEFT JOIN
(SELECT * FROM ItemsMonthly
WHERE (ItemsMonthly.Type='IT' AND ItemsMonthly.YearId='2008')) b
ON Items.ItemNumber = b.ItemNumber
ORDER BY Items.ItemNumber
And what I am getting back is this:
Code:
ODBC Error: SQLSTATE = 37000, Native error code = 0 Syntax Error:
...
LEFT JOIN
(SELECT <<???>> * FROM ItemsMonthly
WHERE ...
Any help on my syntax please...