Comment utiliser le substring dans Qlikview ?

0
756

The string function ‘mid’ has features similar to SQL substring function. An extract from the Qlikview Reference manual is below:

 

mid( s , n1 [ , n2 ] )

Substring of the string s. The result is the string starting at character n1 with the length of n2 characters. If n2is omitted, the function returns the rightmost part of the string starting at character n1. The positions in the string are numbered from 1 and up.

Examples:

mid(‘abcdef’,3 ) returns ‘cdef’.

mid(‘abcdef’,3, 2 ) returns ‘cd’.

mid( Date,3 ) where Date = 970714 returns 0714

mid( Date,3,2 ) where Date = 970714 returns 07

For a more complicated example, see the index function.

LEAVE A REPLY

Please enter your comment!
Please enter your name here