Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2009
    Posts
    3

    Default Grammar only applying to one side of comparison.

    I am using Beyond Compare 4 to compare SQL files generate with and without the "IF NOT EXISTS" clause.

    On one side, you will have 2 single quotes around values (since the whole block is an exec) and the other side will just have 1 single quote.

    and cvTaxStatus = 'NONTAX'
    vs
    and cvTaxStatus = ' 'NONTAX' ' (those are 2-single quotes and not a double quote)

    I have made a Grammar rule with a regular expression ''\w+'' (again 2 single quotes not the double quote character).

    The right side of the file now shows "black", but the whole line is not showing up an an un-important difference (although I have made this new rule unimportant).

    Can someone make a suggestion on how I might make this work?

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,787

    Default

    Hello,

    In the above sample text, there appears to be a space between the pair of single quotes (' '). Is this accurate of your main file, or is the main file without a space ('')?

    If you are using Pro, we have the Session menu -> Session Settings, Misc tab, create a new Text Replacement of:
    ' = ' '

    This can then make this change of quotes unimportant, and the unimportant quotes themselves can be ignored.

    Or, if the entire string should be unimportant, you could use a pair of Delimited grammars, with the same name, such as
    String = ' to '
    and
    String = ' ' to ' '

    the grammar can then be Important or Unimportant, where the second quote ' would still show as a difference.

    Do either of these tips help get your comparison working as expected?
    Aaron P Scooter Software

Posting Permissions

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