on ‎2020 Aug 10 5:13 AM
Hi all,
I have an address block like such;
123 Fake St
Suburb, VIC
4512
I want to only remove the last carriage return so it looks like;
123 Fake St
Suburb VIC 4512
I know i can use the following to get rid of all the carriage returns which does put it all on one line and i have played around with this with no luck getting it right. I have a feeling i need to use a combination of instr, strreverse and right but havent been able to get the logic to work.
replace({Header.Address},chrw(13),'')
As always, any help is greatly appreciated.
Request clarification before answering.
Hi Nick,
Perhaps you can make the STRING_SPLIT function work for you:
SELECT value
FROM STRING_SPLIT('123 Fake St
Suburb, VIC
4512', (CHRW(13)+CHRW(10)));Regards,
Johan
P.S. If this is for use with SAP Business One, you should look into using the RDR12, DLN12, INV12 tables. These tables hold the separated address components.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Johan,
Thanks for the input on this one. Unfortunately i would prefer if this could be done with a crystal formula. I didnt write this particular report myself and the way they have done the commands and table joins is a bit beyond me.
A crystal formula will be the most efficient way for this one.
Regards,
Nick
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.