Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SELECT INTO SQL2K8 from SQL2K Expand / Collapse
Author
Message
Posted Tuesday, August 7, 2012 12:27 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 7:39 AM
Points: 973, Visits: 2,210
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.
Post #1341031
Posted Tuesday, August 7, 2012 12:38 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, June 27, 2014 4:17 AM
Points: 75, Visits: 443
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
Twitter: @SomewereSomehow
Post #1341036
Posted Tuesday, August 7, 2012 2:06 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 7:39 AM
Points: 973, Visits: 2,210
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.
Post #1341056
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse