smash_pants
asked on
Invalid column name SQL
How do i get past the following error:
Invalid column name 'StockCode'.
Invalid column name 'StockCode'.
declare @Table table(Code varchar(50), Qty int)
--data inserted into table here
SELECT dbo.tblColourways.StockCode,
dbo.tblColourways.CartonWeight / dbo.tblColourways.Volume AS Density,
dbo.tblColourways.CartonQuantity,
dbo.tblColourways.Duty,
tblFreight.Minimum,
tblFreight.FuelPerc,
tblFreight.Base
FROM @Table tbl
INNER JOIN dbo.tblColourways ON tbl.Code = dbo.tblColourways.StockCode
INNER JOIN tblFreight ON dbo.tblColourways.StockCode = tblFreight.StockCode
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
make sure that "StockCode" column exsists/or spelled correctly in the table "tblColourways" and "tblFreight"
ASKER
thanks,
tblFreight had been modified so that it no longer had the StockCode Column.
tblFreight had been modified so that it no longer had the StockCode Column.