Skip to content
Advertisement

Split large texts into chunks in separate rows

I have a table, where some texts are atrociously big. I want to make sure every row in the query output does not exceed, say, 100.000 characters. How do I do that?

Here is a quick sample:

Let’s say I want output text column to be less than 10 characters. So, I need this result:

It would be even better if I could also avoid splitting in the middle of words.

Advertisement

Answer

It would be even better if I could also avoid splitting in the middle of words.

Consider below approach

If applied to sample data in your question – output is

enter image description here

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement