Home > Database > Mysql Tutorial > 如下问题,关于sqlserver和Mysql问题

如下问题,关于sqlserver和Mysql问题

WBOY
Release: 2016-06-07 15:39:39
Original
1174 people have browsed it

问题简述,SELECT 的为Mysql数据库里面的数据,要将符合条件的数据插入到sqlserver数据库中,由于参数要有灵活性,所以不能写死,(假如写一个数字参数:6552是可以的换成变量就不行了),这个变量怎么写才正确? 谢谢各位看看,感谢各位看官跃跃发言。 问题

问题简述,SELECT 的为Mysql数据库里面的数据,要将符合条件的数据插入到sqlserver数据库中,由于参数要有灵活性,所以不能写死,(假如写一个数字参数:6552是可以的换成变量就不行了),这个变量怎么写才正确?

谢谢各位看看,感谢各位看官跃跃发言。

问题如下,

如下问题,关于sqlserver和Mysql问题

 

存储过程如下:
ALTER PROCEDURE [dbo].[proc_inserttblCDRIBX10000119]
@CRDid int
AS
insert into dbo.tbl_CDR_IBX1000_0119(CDR_ID,BillIndex,Caller,Called,Connected,BeginTime,EndTime,InPhyChannel,OutPhyChannel,Identification,Remark,TimeLength,queueOfCaller,queueOfCalled,queueOfConnected)

SELECT ID,billIndex,caller,called,connected,beginTime,endTime,inPhyChannel,outPhyChannel,callType,outType,timeLength,queueOfCaller,queueOfCalled,queueOfConnected

FROM OPENQUERY(MYSQL,'select * from tbl_pbx_bill where ID > @CRDid' )

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template