One way is to write a string to a file. You can do this on a single line in the direct window by continuing the line, for example:
Open "C:\SQL.TXT" For Append As #1: Write #1,sSQL : Close #1
Note. You will need to change C: \ SQL.Txt to a path that you can write, depending on your OS.
source share