July 8, 2014 at 1:02 am
Hi all,
I have created a table name "tblPopulation" with fields 'Country', 'State' etc....
When i query it with table name as tblpopulation with fields 'country', 'state' then i get error as invalid object name.
I expect it to be a very small settings of case but could not figure out through google.
Thank You
July 8, 2014 at 1:16 am
USE This
Select * From information_Schema.Columns
Where Table_Name like '%tblPopulation%'
1st verify that table exists or not. If its exists check which Schema its using.
Hope it helps
July 8, 2014 at 1:28 am
Table exists and the schema is dbo
July 8, 2014 at 1:29 am
let me make it clear.
When i query with tblPopulation - i get the results
When i query with tblpopulation - i get the error
July 8, 2014 at 1:33 am
You must be using a case sensitive collation on either the server or the database:
http://msdn.microsoft.com/en-gb/library/hh230914.aspx
July 8, 2014 at 1:42 am
Server Collation is SQL_Latin1_General_CP1256_CS_AS
Same implies for the column.
I have several databases in the same server.
I have a table name "Testmenu" in another database and it perfectly works if i query with 'testmenu' whereas 'tblpopulation doesn't work.
July 8, 2014 at 1:46 am
Then presumably the other database is case insensitive.
July 8, 2014 at 1:48 am
what is your database collation, have you checked it ?
July 8, 2014 at 1:49 am
Other databases has a collation "SQL_Latin1_General_CP1256_CI_AS" same as the database where i have a problem.
July 8, 2014 at 1:53 am
Thank You Cath.
I t was collation issue.
July 14, 2014 at 8:45 pm
Are you running your query in the same database where the table was created?
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply