I have a value (in SQL SERVER) that I am trying to insert into DB2.
Declare @Measure float
@Measure = SELECT -48.51
INSERT OPENQUERY(AS400DB2, 'SELECT Measure FROM SomeTable')
VALUES (Measure)
I tried char(8) and it looks like this on sql server -4851 but in DB2 the field is Numeric(8,4) is -48.51 but if I send at 9999.9999 - the char(8) in SQL Server fails with Arithmetic overflow error converting numeric to data type varchar.
select cast(9999.9999 as char(8))
Please help. As I need answer asap. Thanks.
Declare @Measure float
@Measure = SELECT -48.51
INSERT OPENQUERY(AS400DB2, 'SELECT Measure FROM SomeTable')
VALUES (Measure)
I tried char(8) and it looks like this on sql server -4851 but in DB2 the field is Numeric(8,4) is -48.51 but if I send at 9999.9999 - the char(8) in SQL Server fails with Arithmetic overflow error converting numeric to data type varchar.
select cast(9999.9999 as char(8))
Please help. As I need answer asap. Thanks.