Link to home
Start Free TrialLog in
Avatar of doolinn
doolinnFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Linked Server - Drop Table


I get the error "The object name 'txtsrv...test#txt' contains more than the maximum number of prefixes. The maximum is 2" when i run the following:-

DECLARE @table nvarchar(1000)
DECLARE @SQL nvarchar (1000)
SELECT @SQL = ' txtsrv...[test#txt]'
SELECT @table = 'DROP TABLE' + @SQL
EXEC sp_executeSQL @table

What do I need to change in order to delete the file?

Thanks!
Avatar of Nightman
Nightman
Flag of Australia image

try [servername].[databasename].[dbo].[tablename]
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial