Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2004
    Posts
    4

    Angry Unanswered: Invalid Object Name

    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!

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    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.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Apr 2004
    Posts
    4

    Red face

    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

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'd suggest:
    PHP Code:
    insert into sysdba.hot_list ([HOTLISTID], [Jan] , [type_of_activity])
       
    values ('TEMPHOT00JAN' ,'0' ,'Meeting'
    ...or do without column name quoting at all.

    -PatP

  5. #5
    Join Date
    Apr 2004
    Posts
    4
    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

  6. #6
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Please cut and paste the error message and post it for us.

    -PatP

  7. #7
    Join Date
    Apr 2004
    Posts
    4
    Here it is:-

    Server: Msg 208, Level 16, State 3, Line 1
    Invalid object name 'sysdba.TEMP_HOT_LIST'.

  8. #8
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Does the TEMP_HOT_LIST table exist, or just the HOT_LIST table? Could the "problem child" be addressed in a trigger perhaps?

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •