>
What do you think should I do - create one SP that will return multiple resultsets or multiple SPs to return one resultset each? If the later, should I create multiple properties for each DS and use GetDataSet for each one? >
>Naomi, if the tables are related in some logical way, it is usually better to have one SP that returns multiple result sets...
I'm thinking, actually, what should be the best way to proceed.
On Friday (or Thursday) I created several views and then one SP to combine all information into one result. Since we decided it's not a really good approach, I'm thinking what should I try.
I have a header information which I filter by dates parameters.
Then I need to select multiple detail information.
So, it could be
declare @Hdr table (structure)
insert into @hdr select...
and then join my views based on @Hdr, e.g.
select View.* from @Hdr inner join View
Alternatively each view can be transformed into parameterized view and include dates parameters.
What do you think is better here?
Thanks.
If it's not broken, fix it until it is.
My Blog