SQL Compare field mapping incorrect

pmoorepmoore Posts: 10
edited January 16, 2017 5:14PM in SQL Compare
I have found that SQL compare is mismatching fields.

I've recreated tables with the same names and field names. The target (data warehouse has a few extra fields).

In the comparison window SQL compare is mapping fields with completely different names and data types. See screenshot. A

I have tried with auto mapping both on and off.

it is also skipping fields with identical names and definitions and treating them as a drop/add.
Source: [RT_LEDG_DISC_COMMENT] [varchar] (max) COLLATE Latin1_General_CI_AS NULL CONSTRAINT [DF_RT_LEDG_DISC_COMMENT] DEFAULT (''),
Target: [RT_LEDG_DISC_COMMENT] [varchar] (max) COLLATE Latin1_General_CI_AS NULL CONSTRAINT [DF_RT_LEDG_DISC_COMMENT] DEFAULT (''),

I'm running version: 12.1.0.3760

Comments

  • Hi pmoore,

    HikyPXj.png

    First of all, can I confirm that you are using SQL Compare, as indicated by your post and screenshot? (Just checking since this is the Data Compare forum).

    It sounds like there's some existing mappings information in your project file; the auto-mappings setting won't be applied if mapping operations have been performed manually, which would explain your observation that it has no effect.

    In the middle of the table mapping tab, there should be a link called "Partial" which will open a column mapping dialog. This should allow you to map/unmap individual columns as needed.

    The column mapping dialog also has a "restore defaults" button; it would be useful for us to know whether the defaults are sensible in your case, or whether the behaviour you have described persists.
    Software Developer
    Redgate Software
  • Hi. Sorry yes you are right it's SQL Compare.
    Please move to appropriate forum.
  • I've moved this topic to the SQL Compare forum.

    Did my suggestions help? Do the column mappings have sensible defaults?
    Software Developer
    Redgate Software
  • I have clicked restore defaults as suggested on the main table mapping screen.

    I have also clicked the partial button and clicked restore defaults on that window.

    If I select the same table as before and click partial and get a better looking view. as in fields with the same name line up, and fields with different names don't.

    A

    However when I click compare, it still mismatches fields.

    A

    I have also stopped and restarted SQL Compare, and also my PC.
  • I just deleted my project and started again from the beginning, and got the same results.

    Automap was showing as being turned back on. I had a look at the table field mappings were it displayed the automap feature and it has the mappings wrong.

    I looked at the same table as earlier in this post (which does not display an automap icon) and it had the same incorrect field mapping as show in my screen shots.

    So it seems to get it wrong whether automap is turned on or off, and whether it displays it has used automapping for a table or not.

    This has taken me several hours..
  • I've just repeated the process using 2 tables from each db in 2 local databases on my PC. (much faster!!!!) and I still get the same problem.

    The tables are empty. So the db's are only a few KB in size.

    If it would be of use to you I could send you the db backups and the project file on Monday. (I'm about to leave for the weekend).
  • Yes, please send what you have to support@red-gate.com - This sounds like a bug!
    Software Developer
    Redgate Software
  • Done. Ticket no: 81239
Sign In or Register to comment.