Search code examples
sqlsql-serversql-server-2000

Table contains the column but i still get 'Invalid Object Name' Error


I have a table called tbl_images in my database

Name |Owner |Type |Created_datetime TBL_Images |dbo |user table |2013-06-18 04:24:01.847

this table contains the column - SalesOrganization

I still get the Error as below: Msg 207, Level 16, State 1, Line 1 Invalid column name 'SalesOrganization'.

QUERY Select count(*) tbl_images WHERE SalesOrganization = '5000'

TABLE DESIGN SCREENSHOT:

enter image description here


Solution

  • You are missing from clause in your query

    Select count(*) from tbl_images WHERE SalesOrganization = '5000'