One Row to Multiple Rows – Case 2
【Question】
Here’s column1:
column1
01,02,03
The expected result:
01
02
03
Is there a one-liner solution without using the stored procedure?
【Answer】
It’s not easy to covert a row to multiple rows in any database. But with SPL (Structured Process Language) it becomes easy:
A |
|
1 |
=demo.query("selct column1 from tb1").(column1.split@c()).conj() |
esProc provides JDBC interface to function like a database. See How to Call an SPL Script in Java.
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProc_SPL
SPL Learning Material 👉 https://c.scudata.com
SPL Source Code and Package 👉 https://github.com/SPLWare/esProc
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProc_SPL