|
Posted by Herb Caudill on 03/25/06 00:34
The problem is that the criteria for what subset to be return might be
simple or complicated - but at any rate it's not just a matter of
passing one or two parameters. For instance, in the past I might have
had:
view v_ArticlesBase -- in SS2000, provided ordered results
procedure GetAllArticlesByProgram(@ProgramID)
procedure GetRecentArticlesByProgram(@ProgramID)
procedure GetArticlesByArticle(@ArticleID) -- related articles
procedure GetArticlesByProject(@ProjectID)
... and so on. At the very least, the ordering logic needs to be
repeated in each of these stored procedures.
An alternative would be to create a single monstrous procedure that
consolidates the ordering logic but that uses a lot of conditional paths
to provide all of the subsets listed above - but that seems really
inelegant. Some of these are doing simple matches, while others are
having to traverse one or two linked tables to determine if an article
should be included in the subset.
*** Sent via Developersdex http://www.developersdex.com ***
Navigation:
[Reply to this message]
|