Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rnadesan
Starting Member
2 Posts |
Posted - 2003-10-14 : 14:37:28
|
Hi Folks,I have stored procedure trying to truncate a table on linked server.This is sql syntax:TRUNCATE TABLE server01.database01.dbo.Tablename01I get this error:Server: Msg 117, Level 15, State 1, Line 2The object name 'server01.database01.dbo.' contains morethan the maximum number of prefixes. The maximum is 2.Your advice and input will be greatly appreciated.Thanks and have a nice |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-10-14 : 15:36:53
|
Apparently TRUNCATE TABLE is not allowed against a linked server. TRUNCATE TABLE only allows the 2-part naming convetion: OwnerName.ObjectNameInstead of TRUNCATE TABLE:DELETE FROM server01.database01.dbo.Tablename01Tara |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2003-10-15 : 00:58:04
|
or maybeexec server01.database01.dbo.sp_executesql 'truncate table Tablename01'==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
|
|
|