Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have customerId like this:
a\10
b\20
c\30
d\40
e\50
f\60
g\70
h\80
i\90
I write this type of Syntax Right(CustomerId,2)as CustID I got the result like this( I think this is correct)
CustID
10 |
20 |
30 |
40 |
50 |
60 |
70 |
80 |
90 |
But i want to use right and index function ( right(CustomerId, index(CustomerId, '\')+1) as custID) but result is bad
\10
\20
\30
\40
\50
\60
\70
\80
\90
Syntax plz.( I want \ right side data)
Thanks
Madhu.
you can use subfield function for this , try like this
SUBFIELD(customerId,'\',2) as CustID
you can try this as well:
=mid(CustomerID,3,4) as CustomerID where 3 show start position and 4 show end position
may be this?
=right(CustomerId, index(CustomerId, '\'))
Better you can use Subfield function here
Ex:- =SubField(Col,'\',-1)
LOAD * Inline
[
Col
a\10
b\20
c\30
d\40
e\50
f\60
g\70
h\80
i\90
];
Regards,
Anand
try this
mid(CustID,Index(CustID,'\',1)+1)
Hi ,
Check this,
T:
LOAD *,
Mid(CustomerID,3,4) as ModCustomerID ,
SubField(CustomerID,'\',2) as ModCustomerID1,
TextBetween(CustomerID,'\','') as ModCustomerID2,
Right(CustomerID, Len(CustomerID)-Index(CustomerID, '\', 1)) as ModCustomerID3,
Right(CustomerID,2) as ModCustomerID4
INLINE [
CustomerID
a\10
b\20
c\30
d\40
e\50
f\60
g\70
h\80
i\90
];
Output:
Mostly You can use textbetween Or Subfield or right.
PFA,
Hope this helps,
-Hirish