March 19, 2009 at 7:14 am
Hi,
I am using the addlink server and used the following statement
SELECT * INTO ITW.WebModule.dbo.tblICInventoryZone_99999 FROM [TEST].dbo.tblICInventoryZone
but I got error like this :
The object name 'ITW.WebModule.dbo.' contains more than the maximum number of prefixes. The maximum is 2.
Please help me.
March 19, 2009 at 7:21 am
I don't believe you can use Select Into on a linked server. You have to create the table first, then use Insert Select.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 19, 2009 at 7:23 am
SELECT INTO syntax is designed to create a table on the fly.
i believe a linked server only allows you to add/insert/update into existing objects....not CREATE objects on the fly like that, which is why you get an error.
create the destination table on the linked server and then do the
INSERT INTO linkedservertabe.dbname.owner.tablename
select * from localtable
Lowell
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply