How to execute the multiple line sql using shell script

Hi All,
Please help me to write a shell script to execute the below sql query.

select c.account_no,b.bill_no,a.pay_type,(b.total_due + b.recvd + b.adjusted + b.disputed + b.transferred) as amt_not_billed,d.cash_on_delivery,
(select j.bill_no from
billinfo_T y,
bill_t j
where
y.poid_id0 = j.BILLINFO_OBJ_ID0
and
y.LAST_BILL_T = 1249077600
and
y.bill_info_id = 'COD'
and
y.account_obj_id0 = c.poid_id0
and
j.bill_no is not null
) as COD_BILL_NO,
a.billing_status_flags as is_suspended
from billinfo_T a,
bill_t b,
account_t c,
pr_contract_profile_t d
where
a.POID_ID0 = b.billinfo_obj_id0
and c.poid_id0 = a.account_obj_id0
and c.aac_source = 'PR Billing Account'
and a.pay_type = 10005
and b.bill_no is not null
and (b.total_due + b.recvd + b.adjusted + b.disputed + b.transferred) < 0.2
and d.order_num ='test'
and a.bill_info_id = 'Default Bill';

Thanks in advance.
Giri

which sql ?
Using mysql, I'd put it in a here-doc.

mysql -h $Host -D $Database -u $User -p <<<EOF
# your query
EOF