insert script from a table