SELECT INTO SQL2K8 from SQL2K

  • Hello;

    the below sql statement was executed in the 2008r2 server under SA credentials

    SELECT * INTO TEST1 FROM SQL2KServer.DB1.dbo.Table1

    the object was creates successfully and even I can query the table TEST1 in 2008R2 server and see all the records

    My question is; when i type the table name in the statement it gets underlined with red color indicating "Invalid object name 'TEST1'". (also in the update and delete statement too). So to get rid of this, I closed the connection and then reconnected the query window, still same. So thought of restarting the SQL SERVER service and did and then checked, still same, and finally I had to restart my PC and then when I checked, now the object was showing as normally like other objects. Really not sure of the cause, but want to know is there any fix/work-around for this or restarting the server is the option?

    SQL 2000 Version:

    Microsoft SQL Server 2000 - 8.00.2065 (Intel X86) Jan 11 2012 18:00:51 Copyright (c) 1988-2003 Microsoft Corporation Developer Edition on Windows NT 5.1 (Build 2600: Service Pack 3)

    SQL 2008 R2 Version:

    Microsoft SQL Server 2008 R2 (RTM) - 10.50.1617.0 (Intel X86) Apr 22 2011 11:57:00 Copyright (c) Microsoft Corporation Express Edition with Advanced Services on Windows NT 5.1 <X86> (Build 2600: Service Pack 3)

    Thank you.

    ww; Raghu
    --
    The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.

  • Be sure on what server and db do you execute "select ... into" query. Also specify schema like "select ... into dbo.MyTable...".

    After that, when you want to query created table - verify server, db, specify schema and everything should be ok.

    btw:

    to avoid underlining in SSMS after the new object is created - you may update local cache by pressing: CTRL+SHIFT+R. This has no relation to server.


    I am really sorry for my poor gramma. And I hope that value of my answers will outweigh the harm for your eyes.
    Blog: http://somewheresomehow.ru[/url]
    Twitter: @SomewereSomehow

  • SomewhereSomehow (8/7/2012)


    Be sure on what server and db do you execute "select ... into" query. Also specify schema like "select ... into dbo.MyTable...".

    After that, when you want to query created table - verify server, db, specify schema and everything should be ok.

    btw:

    to avoid underlining in SSMS after the new object is created - you may update local cache by pressing: CTRL+SHIFT+R. This has no relation to server.

    awesome, refreshing the local cache works. thank you. 🙂

    ww; Raghu
    --
    The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply