Jump to content

This topic is 8490 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I wish to compare a field called "account" in one DB with an identical field called "account" in another DB (they are both text fields) and return "1" if the two fields match. I have used the Exact function to define a compare field. Mostly this works fine, but then for some unknown reason sometimes (1 in 20) the compare field gives me a zero even though on checking the second DB, there is a perfect match down to the last space. The account fields contain numbers but is set up as a text field.

I'm going nuts. Can anyone shed some light or suggest a simpler way to do this? Thanks

Posted

You probably already considered this, but the Exact function is case-sensitive. If not that, could it be comparing apostrophes to single quotes? Different size underlines? Different dashes? Perhaps switching your fields to a font that shows ASCII symbol numbers might bring the culprit to light.

If content is all that matters, could you do an If (field = related::field, 1, 0) calc for a less stringent comparison?

Posted

Exact really is exact. I tend to "soften" it a bit by making it case-insensitive...

Exact( Lower(field1), Lower(field2) )

You can also Trim() the fields so it ignors (or never sees) leading and trailing spaces as well.

Posted

Thanks Gentlemen. The function still has me puzzled. Even when I cut and paste the exact field into both DBs it doesn't give me a match. I may have to rethink me approach to this one.

Posted

Indeed.

Exact compares two text strings, the "original" and the "comparison" and they must be exactly alike, exactly alike, for the result to be true.

Old Advance Man

Posted

Thanks - it seems to have solved itself. I had reason to destroy the relationship between the 2 bases and when I reset them the fields I related to each other were the same ones I wanted to compare and it worked perfectly.

Regards

This topic is 8490 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.