LEFT (Azure Stream Analytics)
Returns the left part (from the start) of a character string with the specified number of characters.
Syntax
LEFT ( expression , length )
Arguments
expression
Is a character expression or a column of type nvarchar(max).
length
Is a positive bigint expression that specifies how many characters of the expression will be returned. If length is negative, an error is generated and the statement is terminated. If the sum of start and length is greater than the number of characters in expression, the whole value expression beginning at start is returned.
Return Types
nvarchar(max)
Examples
SELECT
'abcdefg' AS x,
LEFT('abcdefg',2) AS leftX
FROM Input
x | leftX |
---|---|
abcdefg | ab |