sqlserver连接mysql,查询金额报错:The precision exceeded the allowable maximum

https://knowledgebase.progress.com/articles/Article/000046672

https://stackoverflow.com/questions/43556258/the-precision-exceeded-the-allowable-maximum

cast(xx as decimal(18,9))


Change the query to include the CAST function which will cast the problematic column to a decimal format that will be able to handle the stored data, as follows:

create view myview as select * from openquery(SPTEST, 'select cast(number01 as decimal(38,6)) as number01 from PUB.company'); 

猜你喜欢

转载自www.cnblogs.com/stableboy/p/11371435.html
今日推荐