I have the query
select * from products p, products_temp t
where p.ManufacturerPartNumber = t.[INV-PRICE-VENDOR-PART]
where the column names have dashes in them which SQL Server 2005 seems to automatically add brackets to. What is the correct way of accessing this in a query? I've tried with brackets and without the brackets and just end up with errors.
the error I get from sql mgmt studio is
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'where'.
thanks in advance