Input table is having data and result table should read all the data from input table and check the length of Name column and should print the length which is <=5 in result table

[enter image description here](https://i.stack.imgur.com/5ZMxK.png)
[enter image description here](https://i.stack.imgur.com/Ht5gj.png)

can you please suggest using loops (IF else) ...like reading the data using conditions i.e. <=5, and by insert statement storing it in a temporary table variable and by using final select statement we are getting the output... plz help