elsenorjose
Technical User
Using CRXI Professional on Windows XP with MS SQL Server 2005 backend.
I have a column which returns 1 of 2 values if a project has a purchase order or not. If it has 1 or more POs (up to 4 total) it displays like this:
Has PO?
Yes (3054186, , , )
If there is no PO, it displays:
No
The field is a CASE and concatenation:
Ugly database design, but it's what I have to work with.
Basically, what I need help with is trimming any trailing commas. If there is 1 PO, I'll end up with 3 trailing commas; if there are 2 POs, I'll end up with 2 commas, etc.
How can I write a formula to strip only trailing commas but not remove commas if they are really separating different POs?
Thanks
I have a column which returns 1 of 2 values if a project has a purchase order or not. If it has 1 or more POs (up to 4 total) it displays like this:
Has PO?
Yes (3054186, , , )
If there is no PO, it displays:
No
The field is a CASE and concatenation:
Code:
Case When ofd.proj_num is null then
'No'
else
'Yes'+' '+ '('+ ofd.po_num_1 +', ' + ofd.po_num_2+ ofd.po_num_3 +', ' + + ofd.po_num_4 +', ' + ')'
End 'Has PO?'
Ugly database design, but it's what I have to work with.
Basically, what I need help with is trimming any trailing commas. If there is 1 PO, I'll end up with 3 trailing commas; if there are 2 POs, I'll end up with 2 commas, etc.
How can I write a formula to strip only trailing commas but not remove commas if they are really separating different POs?
Thanks