Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Exact string matches

These examples show how to filter records by comparing a field value to a constant string.

In This Section

Exact string match

Exact string non-match

Less-than string match

Less-than-equal string match

Greater-than string match

Greater-than-equal string match

Previous Topic

Next Topic

Exact string match

Include records where the value of a "name" field exactly matches the string "Pele".

"name == \"Pele\""

"strcmp( name, \"Pele\" ) == 0"

"strncmp( name, \"Pele\", 4 ) == 0"

"match( name, \"Pele\" ) == 1"

Previous Topic

Next Topic

Exact string non-match

Include records where the value of a "name" field does not match the string "Pele". Matches include "Michael Jordan", and "Babe Ruth".

"name != \"Pele\""

"strcmp( name, \"Pele\" ) != 0"

"strncmp( name, \"Pele\", 4 ) != 0"

"match( name, \"Pele\" ) == 0"

Previous Topic

Next Topic

Less-than string match

Include records where the value of a "name" field is less than the string "Pele". Matches include "Michael Jordan", and "Babe Ruth".

"name < \"Pele\""

"strcmp( name, \"Pele\" ) < 0"

"strncmp( name, \"Pele\", 4 ) < 0"

Previous Topic

Next Topic

Less-than-equal string match

Include records where the value of a "name" field is less than the string "Pele". Matches include "Pele", "Michael Jordan", and "Babe Ruth".

"name <= \"Pele\""

"strcmp( name, \"Pele\" ) <= 0"

"strncmp( name, \"Pele\", 4 ) <= 0"

Previous Topic

Next Topic

Greater-than string match

Include records where the value of a "name" field is greater than the string "Pele". Matches include "Wayne Gretzky".

"name > \"Pele\""

"strcmp( name, \"Pele\" ) > 0"

"strncmp( name, \"Pele\", 4 ) > 0"

Previous Topic

Next Topic

Greater-than-equal string match

Include records where the value of a "name" field is greater than the string "Pele". Matches include "Pele" and "Wayne Gretzky".

"name >= \"Pele\""

"strcmp( name, \"Pele\" ) >= 0"

"strncmp( name, \"Pele\", 4 ) >= 0"

TOCIndex