IIF



The IIF function is a shorthand for "Immediate If." It returns one of two specified values depending on whether a given condition is true or false. It's employed within queries to conditionally produce a value based on a logical test.




round-pushpin Selects documents from the FlatTranslate schema and determines if the English field is equal to 'cats'.
SELECT
    English,
    IIF(Equals(English, 'cats'), 'YES!', 'no...') as 'IsCats?'
FROM
    WordList:FlatTranslate
WHERE
    English LIKE '%cats'




Home
The home page
SQL :: Checksum
Generates a checksum value based on the data within documents of a specified schema.
SQL :: Concat
Merges or concatenates the values of text fields from documents within a specified schema.
SQL :: DateTime
Gets the local date and time with an optional format string.
SQL :: DateTimeUTC
Gets the UTC/GMT date and time with an optional format string.
SQL :: DocumentID
Returns the internal identifier for a document in a schema document page.
SQL :: DocumentPage
Returns the internal page number that contains the document in a schema.
SQL :: DocumentUID
Returns the internal unique identifier for a document in a schema.
SQL :: Guid
Generates a GUID (globally unique identifier).
SQL :: IndexOf
Gets the position of one string in another string.