SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SELECT INTO SQL2K8 from SQL2K


SELECT INTO SQL2K8 from SQL2K

Author
Message
Raghavendra Mudugal
Raghavendra Mudugal
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3380 Visits: 2958
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.
SomewhereSomehow
SomewhereSomehow
Old Hand
Old Hand (390 reputation)Old Hand (390 reputation)Old Hand (390 reputation)Old Hand (390 reputation)Old Hand (390 reputation)Old Hand (390 reputation)Old Hand (390 reputation)Old Hand (390 reputation)

Group: General Forum Members
Points: 390 Visits: 469
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
Raghavendra Mudugal
Raghavendra Mudugal
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3380 Visits: 2958
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search