all rows plus min / max values using a single stored procedure

Posted by Rajeev on Stack Overflow See other posts from Stack Overflow or by Rajeev
Published on 2010-02-23T15:48:25Z Indexed on 2010/03/21 13:31 UTC
Read the original article Hit count: 489

Filed under:
|

I have a custom data source which pulls out data form a flat file. The flat file contains a timestamp , source and data. I can use sp_execute to execute a select query against the flat file.

I'm currently using 2 stored procedures . - one which runs a select * from flat_file into a temp table - the other which does a select min/max from flat_file grouping by source into another temp file

Im using the data retrieved using the stored procedures in a SSRS report

Is is possible in a a single stored procedure to retrieve all the rows from the file within a date range and also identify the min/max values for each group retrieved ?e

© Stack Overflow or respective owner

Related posts about ssrs

Related posts about sql