How to change datatypes of specific columns for all tables

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #24502

    Hi,

    While replicating from oracle to sqlDWH the datatypes for numeric are automatically converted into numeric with precision. And I don’t need the precision.
    The data type for columns in oracle is numeric but when replicated to SQLDWH it comes as numeric(38,4) with 4 precision.
    So is there a way to change the datatype for all these columns for all the tables who have datatypes like numeric(38,4) to just numeric without the precision.

    Thanks,
    Mohammad Yunus

    #24504
    Mark
    Keymaster

    Mohammed,

    In HVR you can use the action ColumnProperties to modify the data types for columns. To do this for all columns with a specific data type you can use the action ColumnProperties with argument /DataTypeMatch. You can use this with number as the source and options for scale/precision. Please see https://www.hvr-software.com/docs/actions/columnproperties#ColumnProperties-Parameters for the details. Then pick the target data type you want and any scale/precision. Note that the DDL HVR generates must be able to run on the target – SQLDWH in your case.

    Hope this helps.

    Mark.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

© 2020 HVR

Test drive Contact us