Actually problem is also in substr although in ib_udf.sql is note: "This function is NOT limited to receiving and returning only 255 characters, rather, it can use as long as 32767 characters" which is not true or Am I doing something wrong.
If I try "select substr('insert into aaa (id, myval) values (0, 68598)|insert into aaa (id, myval) values (1, 97322)|insert into aaa (id, myval) values (2, 10322)|insert into aaa (id, myval) values (3, 69517)|insert into aaa (id, myval) values (4, 97931)|insert into aaa (id, myval) values (5, 34420)', 1, 50) from RDB$DATABASE" I get string truncation error.
Output was used just for testing.
Main Topics
Browse All Topics





by: NickUpsonPosted on 2007-09-18 at 01:50:03ID: 19911150
the error is coming from ltrim & rtrim, they have a limit of 255 on their argument size.
I would change a couple of things, first as you are using execute procedure, you don't expect any output so the suspend is not required. Second rather than pass 1 big string you can have many parameters all of them a string for 1 insert.