I'm sure this is something really simple that I'm overlooking, but MS SQL is new to me -- I am (or at least thought I was) fairly comfortable with basic MySql though.
SELECT l.link_id, l.link_allcount, d.desc_id, d.desc_count, d.desc_text, h.hour_17, dl.day_19
FROM lnktrk_links AS l, lnktrk_hourly AS h, lnktrk_daily AS dl
LEFT JOIN lnktrk_descriptions AS d ON l.link_id = d.link_id
WHERE l.link_id = h.link_id AND l.link_id = dl.link_id AND l.link_is_click = 1
The error I get is:
'The multi-part identifier "l.link_id" could not be bound.
However l.link_id definitely exists. The following query without the join works as expected:
SELECT l.link_id, l.link_allcount, d.desc_id, d.desc_count, d.desc_text, h.hour_17, dl.day_19
FROM lnktrk_links AS l, lnktrk_hourly AS h, lnktrk_daily AS dl, lnktrk_descriptions AS d
WHERE l.link_id = h.link_id AND l.link_id = dl.link_id AND d.link_id = l.link_id AND l.link_is_click = 1