Can anyone tell me why this gives me the following error:
declare @.hstname varchar (50)
set @.hstname = 'XPTO'
Select * from openquery (@.hstname,'select * from
master..sysdatabases')
Error:
Incorrect syntax near "@.hstname"From Books Online:
"OPENQUERY does not accept variables for its arguments."
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
":)" <anonymous@.discussions.microsoft.com> wrote in message news:33cc01c4291b$82c179b0$a301280a@.phx.gbl...
> Can anyone tell me why this gives me the following error:
> declare @.hstname varchar (50)
> set @.hstname = 'XPTO'
> Select * from openquery (@.hstname,'select * from
> master..sysdatabases')
> Error:
> Incorrect syntax near "@.hstname"
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment