coupling in sprocs

  • Hi,

    I have 2 very similar sprocs.

    1) spJobHistoryGet

    SELECT *

    FROM tblJob

    WHERE isJobCompleted = 1

    2) spJobScheduleGet

    SELECT *

    FROM tblJob

    WHERE isJobCompleted = 0

    so, they are hard-coded into the sproc.

    Would it be better practice to create a single sproc and pass in a param, eg

    SELECT *

    FROM tblJob

    WHERE isJobCompleted = @isJobCompleted 

    I'm caught between hard-coding and tight coupling here folks...

    cheers, yogi.

  • Yes

  • ok, a single sproc it is.

    cheers,

    yogi

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply