SQL sorrting issue, and unwanted blank line above heading

Hi, I am running a shell script on Compaq Tru64 UNIX V5.1A. I have attached the shill script with the sql script it is calling to extract some data(hyp_dta_Extr.sql), and the results. I need the file to be tab delimited. (please note that I have renamed hyp_dta_Extr.sql to hyp_dta_Extr.txt to attach here). I have two issues:
1 - A blank line is being created above the heading. (The first line is a blank line). I would like to know how to prevent the blank line from being created.
2 - I would like the file to be sorted by the first field. But when I get a syntax error when I try something in hyp_dta_Extr like:
.
.
SELECT DISTINCT
('E'||EMPLID) AS "EMP"||chr(9)||
.
.
WHERE PAYGROUP in ('ABC','DEF','GHI')
ORDER BY EMP;

Appreciate any help..

you can format the file before FTP.

something like:

sqlplus USERNAME1/PASSWORD1 <<EOD
@hyp_dta_Extr.sql
EOD

grep -v '^$' HR_DTA.txt | sort -n -k1.2 > tmp.$$
mv tmp.$$ HR_DTA.txt