Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2014

    Unanswered: Data mapping & migration tool

    Hi Guys,

    I am developing one automation tool for data migration from one table to other table, here i am looking for one function or SP for which i will pass source column and destination column as input parameter and want output parameter to return true when source column data is compatible to copy to destination column if not then it should return false.

    For example if source column is varchar and destination column is integer, the script should check all the data in source column in good enough to move to integer column or not and return the output flag. I want a script to work this for all types of data types. Any suggestions it will be helpful.

  2. #2
    Join Date
    Jun 2003
    Provided Answers: 1
    You'll need to reference the sys.syscolumns table and the column type value, and cross-reference that against a table of compatibility. Then you'll also need to check the column width for character data and the precision level for numeric data, as well as check for allowance of NULL values and constraints on the target column.
    If it's not practically useful, then it's practically useless.

    blindman "sqlblindman"

  3. #3
    Join Date
    Jan 2003
    Provided Answers: 17
    You may want to go against the information_schema.columns view, instead. There was a movement to make the information_schema a sort of standard data dictionary.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts