I have a linked server to Oracle database in SQL server and retrieve data to local SQL server database every day by scheduling, the problem is: one of the Oracle database column has holding number with 18 fixed digits which type is NUMBER(18) and when I am trying converting that column to numeric(18,0) or numeric(38,0) and so on, the data converted but for many of them, last digit is different with source data, for example:
data in Oracle database(source): 100002345678912345
data in SQL database (destination): 100002345678912348
Thanks to @Jeroen Mostert. I used
DBCC TRACEON (7314)beforeINSERT INTOand my data is changed toDOUBLEtype, after that to solve the problem I usedSELECT CAST(COLUMN_NAME AS numeric(18,0))for example: