Re : Database Extension Entities

Re : Database Extension Entities

I am using a SQL 2008 R2 database as an Extension.  When using a simple query againt one of my entities (tables), I found Substr does not find matches.  For instance, if I want to match the last 4 characters of a 9-character string it returns nothing.  As a test, I added another column to my database table and populated it with the last 4 characters from the 9-character column and refreshed everything.  Tried the condition again but this time directly on the 4-character string - without having to use Substr - and it matches just fine.  Is there a trick to being able to search on a substring for a field if you are using an external database?

Can you share the query? Normally a subtr would be fine and everything should work as expected.
But without seeing the actual query there is not much we can do.

and for example, did you debug the substr itself?
(assign it to a variable, then use that variable as input for the parameter, so you can actually check if the substr is correct)
did you test-query it with other values?

This is the condition that would not work (it does not error - just does not find a match):
       SSN4 = Substr(Members.SubscriberSSN, 6, 4)

Note the Members entity is my external database extension.  I added a column to the SQL table called SubscriberSSN4 to hold just the 4 characters needed and populated it from the SubscriberSSN column, republished/refreshed the extension so I could see it in the eSpace project, and once I did that the condition below works:

       SSN4 = Members.SubscriberSSN4

I can go this route, but I am just wondering why the Substr function on the first condition would not work.
Thank you for your time in looking at this.