May 31, 2011 at 6:25 am
I want to truncate the table residing on the other system what exactly we should do
truncate table [192.168.0.03].mydatabase.dbo.tmpsch
.' contains more than the maximum number of prefixes. The maximum is 2.
its returning such error but working fine for Select statment ...
is there any alternative
Thanks
May 31, 2011 at 6:30 am
can't say I've ever tried this - bind it into an exec statement and execute on the remote server - or set up a rpc call.
[font="Comic Sans MS"]The GrumpyOldDBA[/font]
www.grumpyolddba.co.uk
http://sqlblogcasts.com/blogs/grumpyolddba/
May 31, 2011 at 6:33 am
Trunacate only supports the three part naming of tables according to BOL.
you could try using, delete or run the command directly against the server
May 31, 2011 at 6:53 am
Hi,
I want to run as job on other server so executing delete statment is expensive in this case.
So is any alternate or the way to used the Truncate syntax
May 31, 2011 at 6:55 am
Create a proc and exec the proc instead of 4 part truncate.
May 31, 2011 at 6:56 am
good , so there is no alternative to used the direct statment
May 31, 2011 at 6:58 am
hidayath (5/31/2011)
good , so there is no alternative to used the direct statment
Yes drop the table and recreate it.
Looks like you're looking a little more at a project where SSIS is a better choice for the job.
May 31, 2011 at 7:02 am
yah but using sql server 2000 version
Any how thanks 🙂
May 31, 2011 at 7:03 am
hidayath (5/31/2011)
yah but using sql server 2000 versionAny how thanks 🙂
DTS still might be a good option...
PS this is sql 2008 forum so you might want to pick sql 7, 2000 forum next time.
May 31, 2011 at 7:05 am
oh your right working on simultaneoulsy on SQL 2008 and 2000 so got messup in posting .
🙂
May 31, 2011 at 7:07 am
hidayath (5/31/2011)
oh your right working on simultaneoulsy on SQL 2008 and 2000 so got messup in posting .🙂
So you're all set?
May 31, 2011 at 7:41 am
hmm quite 🙂
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply