Search options
Search options
My DataBase use mostly Identitynumbers, in South Africa everything is working on "ID" numbers. How can I search for an ID number on only the first 9 digits? Because people give fals ID numbers by changing the last 3 digits and then the program eccept the number because it is not the same number. But actualy it is the same person and then I have dublicates in my database, witch is not allowed. I tried in my query to put just 6 digits in and then I get no replies because there is no such ID number.
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
If you are using Derby database (the default database installed with Aware IM), then you can use function CHARS_FROM_LEFT in queries to limit a search to the first 9 characters of existing attribute values, for example:
FIND Person WHERE CHARS_FROM_LEFT(Person.IdentityNumber, 9) = ?'Identity number'
To check that a specified text is found anywhere within an existing attribute value you can use condition CONTAINS instead of "=", for example:
FIND Person WHERE Person.IdentityNumber CONTAINS ?'Identity number'
Queries that use CONTAINS will work with any database supported by Aware IM.
FIND Person WHERE CHARS_FROM_LEFT(Person.IdentityNumber, 9) = ?'Identity number'
To check that a specified text is found anywhere within an existing attribute value you can use condition CONTAINS instead of "=", for example:
FIND Person WHERE Person.IdentityNumber CONTAINS ?'Identity number'
Queries that use CONTAINS will work with any database supported by Aware IM.
Aware IM Support Team