I am getting an error 'Invalid Object Name' when I try and insert a row yet I can query the same table and get results??
Please Help!Your login probably does not have permission to access the table, either because it has not been set specifically, or the table is not owned by either dbo or the login you are using.
If these are not the problems, then post your code so someone online can review it.|||I am logged in as SA, so I assumed I have permission. But I have also tried running the scripts below when logged in as 'sysdba' user.
Here is a line of code that gives the Invalid Object Name:-
insert into sysdba.hot_list ('HOT_LISTID', 'Jan' , 'type_of_activity') values ('TEMPHOT00JAN' ,'0' ,'Meeting')
This line executes without error:-
truncate table sysdba.hot_list
I must be missing something really obvious!
Thanks
Graham|||I'd suggest:insert into sysdba.hot_list ([HOTLISTID], [Jan] , [type_of_activity])
values ('TEMPHOT00JAN' ,'0' ,'Meeting')...or do without column name quoting at all.
-PatP|||trying...
insert into sysdba.hot_list ([HOTLISTID], [Jan] , [type_of_activity])
values ('TEMPHOT00JAN' ,'0' ,'Meeting')
...didn't work.
I need the column headers as there are more fields in the table than I am inserting with this script.
Thanks
Graham|||Please cut and paste the error message and post it for us.
-PatP|||Here it is:-
Server: Msg 208, Level 16, State 3, Line 1
Invalid object name 'sysdba.TEMP_HOT_LIST'.|||Does the TEMP_HOT_LIST table exist, or just the HOT_LIST table? Could the "problem child" be addressed in a trigger perhaps?
-PatP
No comments:
Post a Comment