running the attached sql statement -- how do I get those results to simply create an MS Excel (with headers and the dataset results).
DECLARE @StartDateTime datetimeDECLARE @FinishDateTime datetimeSET @StartDateTime = '2011-02-01 00:00:00.000'SET @FinishDateTime = '2011-02-28 23:59:59.999'SELECT T1.[MSISDN] AS 'MSISDN',(SELECT COUNT(CAST(CDR_ID as bigint)) FROM [MyDB].[dbo].[CDRData] WHERE (Direction = 1) AND ([MSISDN] = T1.[MSISDN]) AND (CallClass = 1) AND (ChargeableDuration > 0) AND (SetupTime BETWEEN @StartDateTime AND @FinishDateTime)) AS 'MO Calls'FROM [MyDB].[dbo].[CDRData] T1GROUP BY T1.[MSISDN]
thanks qasim - do you have an example pertaining to the attached code to work through / understand? -- csv is ok -- but would really like to a achieve and MS Excel output where possible. (csv out putting is still useful to know though)