You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading from ms-sql, the values in columns of the money type are distorted. Source data (ms):
price (money) prc (money)
296685,43 0,6116
What I did:
LOAD DATABASE
from mssql://user:password@mssqlserver/src_db
into pgsql://user:password@pgserver/trg_db
WITH create no tables, include no drop, data only, truncate
SET PostgreSQL PARAMETERS maintenance_work_mem to '4096000', work_mem to '16384'
INCLUDING ONLY TABLE NAMES like 'Tbl_To_Load' in SCHEMA 'dbo'
ALTER SCHEMA 'dbo' RENAME TO 'shc';
result I got Dest data (ms):
price (money) prc (money)
296685,44 0,6116
how the result is not what you expected.
The result is different due to incorrect rounding of the source datatype "money" (before converting to the destination type numeric for PostgreSQL) to 2 decimal places.
After using the MSSql Money Type - Value is not correct #1494 I got the following result: Dest data (ms):
price (money) prc (money)
296685,43 0,61
What do I need to do to get an exact copy of the money datatype values from MS_SQL Server?
Thank you!
The text was updated successfully, but these errors were encountered:
When loading from ms-sql, the values in columns of the money type are distorted.
Source data (ms):
price (money) prc (money)
296685,43 0,6116
LOAD DATABASE
from mssql://user:password@mssqlserver/src_db
into pgsql://user:password@pgserver/trg_db
WITH create no tables, include no drop, data only, truncate
SET PostgreSQL PARAMETERS maintenance_work_mem to '4096000', work_mem to '16384'
INCLUDING ONLY TABLE NAMES like 'Tbl_To_Load' in SCHEMA 'dbo'
ALTER SCHEMA 'dbo' RENAME TO 'shc';
result I got
Dest data (ms):
price (money) prc (money)
296685,44 0,6116
how the result is not what you expected.
The result is different due to incorrect rounding of the source datatype "money" (before converting to the destination type numeric for PostgreSQL) to 2 decimal places.
After using the MSSql Money Type - Value is not correct #1494 I got the following result:
Dest data (ms):
price (money) prc (money)
296685,43 0,61
What do I need to do to get an exact copy of the money datatype values from MS_SQL Server?
Thank you!
The text was updated successfully, but these errors were encountered: