Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Syntax error

Author  Topic 

daniel50096230
Yak Posting Veteran

99 Posts

Posted - 2009-01-06 : 07:26:06
Insert into Member([MemberID], [Name], [IC], [DOB], [Gender], [TelNo], [Address], [Email], [Password]) Values('M0002','daniel','123456-12-1212','12/07/1987','Male','12345678','kl','daniel@hotmail.com','870712')


Msg 208, Level 16, State 1, Line 1
Invalid object name 'Member'.


What is the problem???My table named "Member",I don't think it has any wrong...

sakets_2000
Master Smack Fu Yak Hacker

1472 Posts

Posted - 2009-01-06 : 07:30:53
check if you have the required permissions.
Go to Top of Page

raky
Aged Yak Warrior

767 Posts

Posted - 2009-01-06 : 07:31:47
ok try this

use < yourdatabase in which member table exists>

Insert into Member([MemberID], [Name], [IC], [DOB], [Gender], [TelNo], [Address], [Email], [Password]) Values('M0002','daniel','123456-12-1212','12/07/1987','Male','12345678','kl','daniel@hotmail.com','870712')

The above problem might be because you might run your query under wrong database
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-06 : 08:31:12
the error is because the table doesnt exists in db where you're running query. first try this and see if table exists

SELECT * INFORMATION_SCHEMA.TABLES WHERE Table_name='Member'
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-01-06 : 10:37:26
quote:
Originally posted by daniel50096230

Insert into Member([MemberID], [Name], [IC], [DOB], [Gender], [TelNo], [Address], [Email], [Password]) Values('M0002','daniel','123456-12-1212','12/07/1987','Male','12345678','kl','daniel@hotmail.com','870712')


Msg 208, Level 16, State 1, Line 1
Invalid object name 'Member'.


What is the problem???My table named "Member",I don't think it has any wrong...



Mention Schema as well and Use like Raky said.
Go to Top of Page
   

- Advertisement -