Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

how to convert a decimal(8,4) on SQL to a numeric(8,4) on DB2?

$
0
0
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.

Viewing all articles
Browse latest Browse all 13329

Trending Articles