Notitie
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen u aan te melden of de directory te wijzigen.
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen de mappen te wijzigen.
De STRINGTONULL functie converteert een tekenreeksexpressie naar null.
Met de STRINGTONULL functie wordt een tekenreeksexpressie geconverteerd naar null in Azure Cosmos DB for NoSQL.
Syntaxis
STRINGTONULL(<string_expr>)
Arguments
| Description | |
|---|---|
string_expr |
Een tekenreeksexpressie. |
Retourtypen
Geeft als resultaat een null.
Voorbeelden
Deze sectie bevat voorbeelden van het gebruik van deze querytaalconstructie.
Tekenreeks converteren naar null
In dit voorbeeld wordt de STRINGTONULL functie gebruikt om verschillende tekenreeksexpressies te converteren naar null.
SELECT VALUE {
parseNullString: STRINGTONULL("null"),
parseWithPrefix: STRINGTONULL("null "),
parseWithSuffix: STRINGTONULL(" null"),
parseWithWhitespace: STRINGTONULL(" null "),
parseUppercase: STRINGTONULL("NULL"),
parseTitlecase: STRINGTONULL("Null"),
parseNull: STRINGTONULL(null),
parseUndefined: STRINGTONULL(undefined)
}
[
{
"parseNullString": null,
"parseWithPrefix": null,
"parseWithSuffix": null,
"parseWithWhitespace": null
}
]
Opmerkingen
- Deze functie maakt geen gebruik van de index.
- Als de expressie niet kan worden geconverteerd, retourneert
undefinedde functie .