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 |
|
imStuck
Starting Member
8 Posts |
Posted - 2006-02-01 : 18:15:15
|
| hi,Im trying to execute a function on a linked server but an error tells me i have too many prefixes. My line of code is like so. SET variable = ServerName.catalog.dbo.FunctionName(parameters)When i access a table on the linked server using this prefix format it works fine. Ive tried losing the '.dbo.' prefix but it says the object was not found. Any suggestions? |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-02-01 : 19:58:48
|
| That syntax is not valid for functions.you can use sp_executesql to execute it.exec svr.db.dbo.sp_executesql N'set var = ...', ...see http://www.nigelrivett.net/SQLTsql/sp_executeSQL.htmlfor setting a variable value.==========================================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. |
 |
|
|
|
|
|