i wonder if anybody can assist me this is doing my head-in. I am using Query and linking it with Excel 03 to pull the result. The query works fine in Sql server but when it runs in Excel Query it removes the header for all the allias used within the query. Any suggestion why its happining. I can't manually keep writing since its a regular report.
select rtrim(service) as service,sum(NumberOfPassengers)Passenger,
Company, DepartureMonthName, DepartureYear
where DepartureDate between '01-jan-2012'and getdate()
and (DepartureName like 'random%'
or ArrivalName like 'ramdp,%')
group by ServiceNumberOld,DepartureName,ArrivalName,Company,DepartureMonthName,DepartureYear,ServiceNameOld