Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
How can I get 566 and 2657 in string :
5-300 | 6-800 | 6-805
2-300 | 6-455 | 5-899 | 7-800
Thanks for your help.
Hi,
Load this way
S:
LOAD String,Left(Trim(SubField(String,'|')),1) as New;
LOAD * Inline
[
String
5-300 | 6-800 | 6-805
2-300 | 6-455 | 5-899 | 7-800
];
NoConcatenate
LOAD
String,
Concat(New,'') as NewString
Resident S
Group By String;
DROP Table S;
Regards
Anand
Adding it to the string or taking it out?
Hi,
Load this way
S:
LOAD String,Left(Trim(SubField(String,'|')),1) as New;
LOAD * Inline
[
String
5-300 | 6-800 | 6-805
2-300 | 6-455 | 5-899 | 7-800
];
NoConcatenate
LOAD
String,
Concat(New,'') as NewString
Resident S
Group By String;
DROP Table S;
Regards
Anand
Not an elegant solution but:
Left(SubField(PurgeChar([Field Name],' '),'|',1),1) & Left(SubField(PurgeChar([Field Name],' '),'|',2),1) & Left...
Where [Field Name] is the name of your field above, and then repeat this as many times as you needed (in your example you'd need 4) changing the number after the '|' delimiter in the SubField function.
Load PurgeChar(Left(Txt,1) & TextBetween(Txt,'|','-',1) & TextBetween(Txt,'|','-',2) & TextBetween(Txt,'|','-',3) & TextBetween(Txt,'|','-',4),' ') As Str;
Load * Inline [
Txt
5-300 | 6-800 | 6-805
2-300 | 6-455 | 5-899 | 7-800 ];
Thanks you for your response!!