Target Server : IWS_IQ.
Query Executed from : ASE server.

NOTE: when i execute the query in IQ directly. there is no error.

NOTE: S.DW_CALL_START_DT_ID column of the target table is unsigned int not null

begin

declare @d1 char(8)
declare @d2 char(8)
declare @commit1 varchar(8)
declare @insert_str varchar(16000)

select @d1 = convert(char(8), 20090901)
select @d2 = convert(char(8), 20090902)
select @commit1 = "commit"

select @insert_str = 'insert into prd.SCOV2_U_REV (' + 'DW_ORIG_SERV_ID , MONTH_END_DT, SOURCE_SYS,' +
'DW_PRICEBL_ID ,TYPE_TRAFF, TOTAL_TIER_CHARGE,ACTUAL_UNITS )' +
' select S.DW_ORIG_SERV_ID, S.DW_CALL_START_DT_ID , S.SOURCE_SYS,' +
'0 as DW_PRICEBL_ID, ''V'' as TYPE_TRAFF, ' +
' sum( NUM_OF_CALLS) as TOTAL_TIER_CHARGE, 0 as ACTUAL_UNITS ' +
' from prd.S_DAY_BY_DEST as S where ' +
' S.DW_CALL_START_DT_ID >= ' + @d1 + ' and ' +
' S.DW_CALL_START_DT_ID < ' + @d2 + ' ' +
' group by S.DW_ORIG_SERV_ID, S.DW_CALL_START_DT_ID, ' +
' S.SOURCE_SYS, S.DW_PRICEBL_ID, S.ACTUAL_UNITS '

print "%1!", @insert_str

exec sp_remotesql 'IWS_IQ', @insert_str

end