I have a 10 digit field (actually it's stored as a string, but all the characters are numbers), and I'm trying to use the In-DB Filter tool to find all the records that have the number 6 in the 4th character's place in that field. I can do this with a normal filter using REGEX Match. This is what that filter looks like: REGEX_Match([HASH_NUM], "\d{3}6\d{6}"). I just can't figure out how to do the same thing with the In-DB Filter tool. Can anybody help me with this?
Solved! Go to Solution.
What database are you using?
In-DB formula and filter depend on the DB syntax.
Cheers,
I believe it's called a Generic ODBC. It has a SQL Editor on the Choose Table or Specify Query screen. Does that help?
Ok I just checked - it's SQL Server.
Try using the filter In-DB tool like this
RIGHT(LEFT(Field, 4), 1) = "6"
Would that work?
If it doesn't work please take a screenshot of the configuration of your In-DB filter tool.
Cheers,
@Thableaus wrote:
No, I mean, which database vendor?
Oracle, SQL Server, MySQL, Amazon Redshift...
Got it! SUBSTRING("INVC_NUM", 4, 1) = 6