Help Center/ Database and Application Migration UGO/ User Guide/ Syntax Conversion/ Conversion Error Codes/ Error Codes Generated During Conversion from SQL Server to PostgreSQL/ U0520001: The SMALLDATETIME data type in SQL Server is accurate to minute, while the TIMESTAMP (0) data type in PostgreSQL is accurate to second
Updated on 2025-06-07 GMT+08:00

U0520001: The SMALLDATETIME data type in SQL Server is accurate to minute, while the TIMESTAMP (0) data type in PostgreSQL is accurate to second

Description

Database Type and Version

  • Source database type and version: all SQL Server versions
  • Target database type and version: all PostgreSQL versions

Syntax Example

In SQL Server, the SMALLDATETIME data type does not map to another type in PostgreSQL. UGO uses TIMESTAMP (0) for conversion and displays the precision difference between the two types. For example:

SQL Server syntax:

CREATE TABLE tab(c1 SMALLDATETIME);
Figure 1 Handling the SMALLDATETIME data type in SQL Server on UGO

Suggestion

Check whether the UGO conversion solution meets service and application requirements or modify the data type.