Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have table with multiple fields and from on field named Names i want to remove the symbol |
| KEY, | Names |
| 1, | Alan | Bros |
| 2, | Peter | Kobal |
| 3, | James | Kris |
| 4, | Martin | Ross |
| 5, | Kristien | Grenn |
Jay
Hi,
Then try this ways
Source:
LOAD *,SubField(Names,'|',1) as FirstName,
SubField(Names,'|',2) as LastName;
LOAD SubField(Names,'|') as New,KEY, Names;
LOAD * Inline
[
KEY, Names
1, Alan | Bros
2, Peter | Kobal
3, James | Kris
4, Martin | Ross
5, Kristien | Grenn
];
Regards
Anand
=purgechar ( 'Alan | Bros' , '|' )
Use
=Subfield(Names,'|',1)& ' ' &Subfield(Names,'|',2)
Use the replace function.
An example: replace('abccde','cc','xyz') returns 'abxyzde'
In your case = Replace(Names,'|',' ')
Hope it helps!
Br,
T
Hi,
Try to load your table like this way
Source:
LOAD SubField(Names,'|') as New, KEY, Names;
LOAD * Inline
[
KEY, Names
1, Alan | Bros
2, Peter | Kobal
3, James | Kris
4, Martin | Ross
5, Kristien | Grenn
];
Regards
Anand
=purgechar(Names,'|')
You can use purgeChar().
ex: PurgeChar(Names,'|')
Check this file
And how can i create the two fields in the load script from the same.
Hi,
Then try this ways
Source:
LOAD *,SubField(Names,'|',1) as FirstName,
SubField(Names,'|',2) as LastName;
LOAD SubField(Names,'|') as New,KEY, Names;
LOAD * Inline
[
KEY, Names
1, Alan | Bros
2, Peter | Kobal
3, James | Kris
4, Martin | Ross
5, Kristien | Grenn
];
Regards
Anand