原帖由
chuxu 于 2008-6-27 15:04 发表

location 这个语法是IQ的。应该登陆到IQ上,使用这个语法从ASE中获取数据
create procedure proc_01 ( @work_date char(10) , ret int OUTPUT)
as
begin
insert into account_mxb ( node,amt,workdate) location 'ASE.misinfo' { select node,amt,workdate from account_mxb where workdate = @work_date }
if sqlcode !=0
set @ret = -1
return
@ret = 0
return
end
create procedure proc_01 ( @work_date char(10) , ret int OUTPUT)
as
begin
EXECUTE IMMEDIATE WITH RESULT SET OFF 'insert into account_mxb ( node,amt,workdate) location '' || 'ASE.misinfo' || ' ' { select node,amt,workdate from account_mxb where workdate = '' || work_date || ''}'
if sqlcode !=0
set @ret = -1
return
@ret = 0
return
end