Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have one column values in sql table as
Name= 32456 Mr Adam Jones
I need to get Name= Mr Adam Jones in Straight table. Could anyone help me how to write expression or script to get obly name part.
Thanks.
Hi,
I am assuming that all the values have a 5 digit numerical value preceeding a name. You can use Mid function as follows:
Load * Inline [
Name
32456 Mr Adam Jones
32247 Mr Brown Smith
] ;
Then use the following function and add it as a calculated dimension:
Mid(Name,7)
Also, you can use the 3rd parameter in Mid() function, if you need to specify the length of the string to be returned.
Hope this helps!
Hi,
I am assuming that all the values have a 5 digit numerical value preceeding a name. You can use Mid function as follows:
Load * Inline [
Name
32456 Mr Adam Jones
32247 Mr Brown Smith
] ;
Then use the following function and add it as a calculated dimension:
Mid(Name,7)
Also, you can use the 3rd parameter in Mid() function, if you need to specify the length of the string to be returned.
Hope this helps!
Hi,
Use this
=PurgeChar(Name, '1234567890')
Regards,
Jagan.
In the script try
mid(Name,(1+Index(Name,' '))) as Name
Purgechar('32456 Mr Adam Jones' , '0123456789')
The opposite is keepchar.
Hi Amelia,
Use Either of
PurgeChar(Name, '1234567890')
or
KeepChar(Name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz').
You can use it in either script or expressions. Better to use it in script and create a field with all texts.
Thanks..
Use PurgeChar() like:
=PurgeChar(NameField, '0123456789')
Use PurgeChar function
PurgeChar (Name,''0123456789)
I have provided two ways to get rid of the number. Please see attached
Hi,
if you know that numbers are fix length like above 32456 (five digit).
than you can use Right function in script.