Jan 8, 2008 #1 bmann Programmer Joined Oct 8, 2002 Messages 128 Location US I am on calphoto server and trying to truncate a table from a linked sql server. I would appreciate anyone's help. Here is the code(Linked server CALPHOTODOJ): truncate table CALPHOTODOJ.audit.dbo.status
I am on calphoto server and trying to truncate a table from a linked sql server. I would appreciate anyone's help. Here is the code(Linked server CALPHOTODOJ): truncate table CALPHOTODOJ.audit.dbo.status
Jan 8, 2008 #2 SQLDenis Programmer Joined Oct 1, 2005 Messages 5,575 Location US here you go Code: EXECUTE CALPHOTODOJ.master.dbo.sp_executesql N'TRUNCATE table audit.dbo.status' Denis The SQL Menace -------------------- SQL Server Code,Tips and Tricks, Performance Tuning SQLBlog.com, Google Interview Questions Upvote 0 Downvote
here you go Code: EXECUTE CALPHOTODOJ.master.dbo.sp_executesql N'TRUNCATE table audit.dbo.status' Denis The SQL Menace -------------------- SQL Server Code,Tips and Tricks, Performance Tuning SQLBlog.com, Google Interview Questions
Jan 8, 2008 Thread starter #3 bmann Programmer Joined Oct 8, 2002 Messages 128 Location US Thanks SQLDenis. That code works. Upvote 0 Downvote