How can we help you today? How can we help you today?

Is there a way to ignore Carriage Return differences?

Is there a way to compare two field values that contain JSON in the columns but tell SQL Compare to ignore the difference in carriage returns?  For example when I click to see the differences I get:

shuff1203
0

Comments

5 comments

  • Peter_Laws
    Hello shuff1203,

    Thanks for the question, please could you try setting this option?

    Peter_Laws
    0
  • shuff1203
    Peter_Laws said:
    Hello shuff1203,

    Thanks for the question, please could you try setting this option?

    That does not work.
    shuff1203
    0
  • Peter_Laws
    Since you said it was JSON, are the whitespace differences in the body of the JSON or around it please?
    Peter_Laws
    0
  • shuff1203
    As you can see in my screenshot it's not white space differences - it's a difference of carriage return types.  My guess is someone pasted the script to update the database and SMSS said do you want to change the carriage returns they said yes and then ran it so now when I do a compare it shows that difference in carriage return on the JSON within the two fields.
    shuff1203
    0
  • Peter_Laws
    Sorry when I said whitespace, I meant non-displayed characters.

    Yes I expect you're correct, this is an issue we have to solve with version control often.
    I'm afraid there's not a switch for this to perform a textual comparison vs a byte level comparison.
    Peter_Laws
    0

Add comment

Please sign in to leave a comment.