Announcement

Collapse
No announcement yet.

Limited comparison on specific columns

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Limited comparison on specific columns

    Hi,

    I am using Beyond Compare 3 to do a file compare and I’m having trouble getting the desired result. If the values in columns 16 – 30 are all 9’s, I want to compare the data in columns 1-94 and 100-301 on each record. If the values are not 9’s in columns 16 – 30, I want to compare the entire record.

    My first thought is that I need to do 2 separate compares, 1 with the 9’s in column 16 - 30, and 1 without. So if I setup a Grammar, with the text matching 9’s, I can narrow the comparison down to those rows, but I’m having difficulty limiting the comparison criteria to Columns 1-94 and 100-301. I’m thinking I might need a regular expression to do it, but I’m hoping somebody can give me advice on how they would proceed. I’ve attached a small subset of each file for reference.

    Thanks!

    Mike

  • #2
    Hello,

    BC3 does not include conditional grammar support. Instead of a definition on "if col 16-30 =", we'll need to come up with an overarching grammar that can match on specific content, and then make it either Important or Unimportant.

    Since there is overlap (col 16-30 is included in the comparison of col 1-94), I do not see a good way of tackling this within BC3. Maybe a preprocess which would detect your rows that contain 15 "9"s could then strip out col 95-99, or replace it with a specific text which can easily match a defined grammar and be ignored? This preprocess can be built into a BC3 file format and called automatically when these files are opened.
    Aaron P Scooter Software

    Comment


    • #3
      It might also be helpful to try comparing your files in the Data Compare. It can recognize delimited data files and compares them in a row and column mode that looks similar to Microsoft Excel.
      Chris K Scooter Software

      Comment

      Working...
      X