Tech Tip: Querying for the character "@"
PRODUCT: 4D | VERSION: 15 | PLATFORM: Mac & Win
Published On: February 18, 2016
In 4D, the character "@" is used as a wildcard character. This can be useful inside of queries. For example, the code below searches for all names in Table_1 that begin with the character "B":
QUERY([Table_1];[Table_1]Name="B@") |
However, this may make it difficult to find fields that actually contain the character "@". To solve this issue, replace the char '@' with Char(65312) or Char(0xFF20). The code below will find all names in Table_1 that equal "@":
QUERY([Table_1];[Table_1]Name=Char(65312)) |
To find all names in Table_1 that contain the character "a", do the following:
QUERY([Table_1];[Table_1]Name="@"+Char(65312)+"@") |
Commented by Keith Culotta on February 22, 2016 at 3:40 PM
To find all names in Table_1 that contain the character "a", do the following: ?Typo?
To find all names in Table_1 that contain the character "@", do the following: