split_cursor
The split_cursor function can convert one row of records into multiple rows or convert one column of records into multiple columns. Table-valued functions can only be used in JOIN LATERAL TABLE.
Function |
Return Type |
Description |
---|---|---|
split_cursor(value, delimiter) |
cursor |
Separates the "value" string into multiple rows of strings by using the delimiter. |
Example
Input one record ("student1", "student2, student3") and output two records ("student1", "student2") and ("student1", "student3").
create table s1(attr1 string, attr2 string) with (......); insert into s2 select attr1, b1 from s1 left join lateral table(split_cursor(attr2, ',')) as T(b1) on true;
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.