August 9, 2012 at 5:08 am
2 things I need to...
1 Truncate my MYSQL table via Linked server using OPENQUERY if possible.
2 If truncate is not possible can I reseed the id field after running DELETE FROM OPENQUERY (****)
Would prefer to truncate if possible rather than delete.
These are performed using a linked server
August 9, 2012 at 6:20 am
LinkedServerName.Catalog.Schema.TableName
What is the default schema of a 4 part qualifier name for a MYSQL table?
August 9, 2012 at 7:03 am
i think you can do it like this?
EXECUTE ( 'TRUNCATE TABLE SalesTable' ) AT MyLinkedServer;
that code example is how i can calla CREATE TABLE command at a remote, i think you can do the same for truncate.
--create a table on the remote
EXECUTE ( 'CREATE TABLE Sandbox.dbo.SalesTable
(SalesID int, SalesName varchar(20)) ; ' ) AT PROD2K8;
Lowell
August 9, 2012 at 9:06 am
You the man!!!
Nice one worked a treat.
August 9, 2012 at 9:14 am
glad i could help!
Lowell
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply