declare a file variable:<br> out_file TEXT_IO.FILE_TYPE;<br>...<br>open it:<br>out_file := TEXT_IO.FOPEN('C:\TEMP\FOO.TXT','W'); (or 'A' to append)<br><br>do your select into var1, var2...<br>create a text string:<br>text := var1 ¦¦ var2 ¦¦ (use delimiters if you need: ¦¦ ',' ¦¦<br><br>write to it:<br> TEXT_IO.PUT_LINE(out_file,text);<br> TEXT_IO.NEW_LINE;<br><br>close it:<br> TEXT_IO.FCLOSE(out_file);