Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 2.36 KB | None | 0 0
  1. USE [SDS_DevSchoolDistrict]
  2. GO
  3.  
  4. -- =================================================================================
  5. -- Copyright:   School Data Solutions
  6. -- =================================================================================
  7. CREATE PROCEDURE [dbo].[SetStudentLearningCommitment]
  8.     @StudentLearningPlanId                      int,
  9.     @StudentLearningPlanCommitmentId    int,
  10.     @StudentLearningPlanCommitmentApplies   bit
  11. AS
  12. BEGIN
  13.  
  14.     -- =============================================================================
  15.     --
  16.     -- =============================================================================
  17.     IF(@StudentLearningPlanCommitmentApplies = 1)
  18.     BEGIN
  19.             INSERT  StudentLearningPlans_Commitments
  20.             (
  21.                     StudentLearningPlanId,
  22.                     StudentLearningPlanCommitmentId
  23.             )
  24.             VALUES
  25.             (
  26.                     @StudentLearningPlanId,
  27.                     @StudentLearningPlanCommitmentId
  28.             )
  29.     END
  30.     ELSE
  31.     BEGIN
  32.             DELETE  StudentLearningPlans_Commitments
  33.             WHERE   StudentLearningPlanId = @StudentLearningPlanId
  34.               AND   StudentLearningPlanCommitmentId = @StudentLearningPlanCommitmentId
  35.     END
  36.     -- =============================================================================
  37.  
  38. END
  39. GO
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46. -- =================================================================================
  47. -- Copyright:   School Data Solutions
  48. -- =================================================================================
  49. CREATE PROCEDURE [dbo].[SetStudentLearningPlanQualifyingCondition]
  50.     @StudentLearningPlanId                      int,
  51.     @StudentLearningPlanQualifyingConditionId   int,
  52.     @StudentLearningPlanQualifyingConditionApplies  bit
  53. AS
  54. BEGIN
  55.  
  56.     -- =============================================================================
  57.     --
  58.     -- =============================================================================
  59.     IF(@StudentLearningPlanQualifyingConditionApplies = 1)
  60.     BEGIN
  61.             INSERT  StudentLearningPlans_QualifyingConditions
  62.             (
  63.                     StudentLearningPlanId,
  64.                     StudentLearningPlanQualifyingConditionId
  65.             )
  66.             VALUES
  67.             (
  68.                     @StudentLearningPlanId,
  69.                     @StudentLearningPlanQualifyingConditionId
  70.             )
  71.     END
  72.     ELSE
  73.     BEGIN
  74.             DELETE  StudentLearningPlans_QualifyingConditions
  75.             WHERE   StudentLearningPlanId = @StudentLearningPlanId
  76.               AND   StudentLearningPlanQualifyingConditionId = @StudentLearningPlanQualifyingConditionId
  77.     END
  78.     -- =============================================================================
  79.  
  80. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement