Welcome to the forum! One way to do this would be to copy the text of the script to your clipboard, then, in the data table's red triangle, select New Script, and paste that into the table. This script will then be saved to the data table.
You may already know this, as well, but in case you don't: when you run an analysis and want to save it, you can select the Red Triangle in the analysis...Save Script...To Data Table. This will do the same thing as above, but without having to save the script to a file first.