Hello I have the below sql query:
select P.MedRecNo ,CONVERT(char(10),DispenseDt,101) as Dispensedt,'BB','H0004',(CAST(Qty AS INT)) as QTY,Qty/TtlPrice as UnitPrice from Billing B
left join Patients p on B.PatID = p.PatID and B.FacID = p.FacID
where B.facid ='1' and B.MOP='FACI'
and Billed between '2013-9-1 00:00:00' and '2013-9-30 00:00:00'
and B.InvoiceGrp in ('MEDA','MGCARE')
I have to generate the recordset as
but the data should be in ASCII format.