当前位置: 代码迷 >> Sql Server >> 请教下列怎样传送参数呢?多谢
  详细解决方案

请教下列怎样传送参数呢?多谢

热度:54   发布时间:2016-04-27 21:25:05.0
请问下列怎样传送参数呢?谢谢
declare   @ipaddress   char(30)
set   @ipaddress= '127.0.0.1 '
select     *   into   A   from   OPENDATASOURCE(
                  'SQLOLEDB ',
                  'Data   Source=127.0.0.1;User   ID=sa;Password=sa '
                  ).SERVERDB.dbo.MFG   where   dbo.MFG.DATETIMES   > = '2007-3-9 '

[email protected],去做data   source的参数呢?
thanks

------解决方案--------------------
declare @ipaddress char(30)
set @ipaddress= '127.0.0.1 '
declare @s varchar(8000)
set @s= 'select * into A from OPENDATASOURCE(
' 'SQLOLEDB ' ',
' 'Data Source= ' ' '[email protected]+ ';User ID=sa;Password=sa ' '
).SERVERDB.dbo.MFG where dbo.MFG.DATETIMES > = ' '2007-3-9 ' ' '
  相关解决方案