Forum Discussion

jzy5282's avatar
jzy5282
Regular Visitor
4 years ago

How do you split a string into 4 columns based on delimiter?

 

 

How can I split each cell in column fyValues in to records and then transpose so the result its:

IDfyValues

8390.00|2021|false|839|35,000.00|2022|true|839|35,000.00|2023|true|839|35,000.00|2024|true|839|35,000.00|2025|true|839|35,000.00|2026|true|839|0.00|2027|false|839|
8400|2014|TRUE|840|0|2015|TRUE|840|0|2016|TRUE|840|0|2017|TRUE|840|0|2018|TRUE|840|0|2019|TRUE|840|0|2020|TRUE|840|12500|2021|TRUE|840|12500|2022|TRUE|840|12500|2023|FALSE|840|12500|2024|FALSE|840|12500|2025|FALSE|840|12500|2026|FALSE|840|
8410|2014|TRUE|841|15000|2015|TRUE|841|15000|2016|TRUE|841|15000|2017|TRUE|841|15000|2018|TRUE|841|15000|2019|TRUE|841|0|2020|TRUE|841|0|2021|TRUE|841|0|2022|TRUE|841|0|2023|FALSE|841|0|2024|FALSE|841|0|2025|FALSE|841|0|2026|FALSE|841|
8450.00|2020|false|845|0|2021|TRUE|845|40000|2022|TRUE|845|40000|2023|FALSE|845|40000|2024|FALSE|845|40000|2025|FALSE|845|40000|2026|FALSE|845|0.00|2027|false|845|

   

the second column is fyValues

 

Result: 

  Value | Year | Status | ID

1

2

3

4

5

.

.

.

 

1 Reply

  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    Most Valuable Professional

    Can you please post a picture of your result as in table only first column is coming?