Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
upper(left(path,index(path,'\',4)-1))
path is \\zwcghtbu723\kmtot0123
how it works for this path
index(path,'\',4)
left(path,index(path,'\',4)-1) give me explination pls
Hi,
In expression index(path,'\',4) this search the position of ( '\' ) from left for 4th symbol that is not in the path if you use
index(path,'\',3) this gives 14
index(path,'\',2) this gives 2
index(path,'\',1) this gives 1
Similarly if you use
=left(path,index(path,'\',4)-1) |
This gives nothing but if you use
=left(path,index(path,'\',3)-1)
This gives nothing but if you use string \\zwcghtbu723
From left of Path 14-1 = 13 means upto 13
Regards
Anand
index(path,'\',4) will return the position of the 4th \ character in the text string value of the path field. In your example there are only three \ characters so this returns 0. 0-1 is -1. The left function doesn't accept a negative length so the expression will return null.
Hi,
In expression index(path,'\',4) this search the position of ( '\' ) from left for 4th symbol that is not in the path if you use
index(path,'\',3) this gives 14
index(path,'\',2) this gives 2
index(path,'\',1) this gives 1
Similarly if you use
=left(path,index(path,'\',4)-1) |
This gives nothing but if you use
=left(path,index(path,'\',3)-1)
This gives nothing but if you use string \\zwcghtbu723
From left of Path 14-1 = 13 means upto 13
Regards
Anand