Is it possible to have a LIKE with a single character number or an empty string?
I know this will sound stupid, and I'm pretty sure it is not possible, but I will ask.
I have a field in which I will write LIKE (as a string). I will apply it later with an expression in WHERE : ... LIKE tableX.FormatField ... It must contain a number (single character or empty string).
Something like [0-9 ] . Where a space in square brackets means an empty string.
EDIT:
I think Iโm not explaining it very well. I have a table in which I have a configuration of parameters - TblParam with a DataFormat field. I have to check the value from another TblValue table with the ValueToCheck field. Verification is performed upon request. The part to check is as follows:
... WHERE TblValue.ValueToCheck LIKE TblParam.DataFormat ...
For the configuration value, I need an expression for 1 numeric character or an empty string. Something like [0-9''] . Due to the automatic nature of the check, I need a single expression (without AND OR OR statements) that can match the query (see Example above). The same check is valid for other types of checks, so I need to install my check mechanism.
I'm pretty sure I can't use [0-9''] , but I ask the question if anyone has any other suitable solution.
Actually, itโs hard for me to check the version line: 1.0.1.2 or 1.0.2 . It can contain 2-3 dots ( . ) And numbers.
source share