nvo_pipeline invo_pipeline
invo_pipeline = create nvo_pipeline
string ls_pipe_syntax
ls_pipe_syntax='pipeline(source_connect=source.INI,destination_connect=target.INI,type=APPEND,commit=100,errors=100,keyname="wor_ID")'+&
'source(name="membertbl",column(type=nvarchar, name="id",dbtype=nvarchar(10),key=yes, nulls_allowed=yes))'+&
'retrieve(statement="SELECT * FROM TZ_WorkList")'+&
'destination(name="TZ_WorkList",column(type=varchar,name="user_ID",dbtype=varchar(20),key=no,nulls_allowed=no))'
invo_pipeline.syntax =ls_pipe_syntax
//insert into [WSYC].[dbo].[TZ_WorkList](user_ID) select id from [WSYC].[dbo].[membertbl]
integer pipe_start_result
pipe_start_result=invo_pipeline.start(itr_source,itr_target,dw_error)
st_read.text = string(invo_pipeline.rowsread)
st_error.text = string(invo_pipeline.rowsinerror)
st_write.text = string(invo_pipeline.rowswritten)
------解决方案--------------------
什么错误?
------解决方案--------------------
invo_pipeline
没有start
invo_pipeline.start(ist_source, ist_target, dw_error)
------解决方案--------------------
ls_pipe_syntax='pipeline(source_connect=source.INI,destination_connect=target.INI,type=APPEND,commit=100,errors=100,keyname="wor_ID")'+&
'source(name="membertbl",column(type=nvarchar, name="id",dbtype=nvarchar(10),key=yes, nulls_allowed=yes))'+&
'retrieve(statement="SELECT * FROM TZ_WorkList")'+&
'destination(name="TZ_WorkList",column(type=varchar,name="user_ID",dbtype=varchar(20),key=no,nulls_allowed=no))'
这里面每一行都要加上换行符:~r~n
另外 SELECT * FROM TZ_WorkList 这里面的列必须与source和description中的column数量一致
------解决方案--------------------
'RETRIEVE("statement=insert into [WSYC].[dbo].[TZ_WorkList](user_ID) select id from [WSYC].[dbo].[membertbl]")'+"~r~n"
不用insert into
'RETRIEVE("statement=select id from [WSYC].[dbo].[membertbl]")'+"~r~n"
------解决方案--------------------
都说了,不用insert into
select id from membertbl
------解决方案--------------------
'RETRIEVE("statement=select ~"membertbl~".~"id~" from membertbl")'+"~r~n"
------解决方案--------------------
加我Q,发个给你865359042
------解决方案--------------------
很厉害呀!~~~~