Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.97 KB | None | 0 0
  1. select * from Workshop
  2.  
  3. exec addWorkshopToDay
  4. @workshopID = 1,
  5. @conferenceDayID = 5,
  6. @participantsLimit = 30,
  7. @price = 100,
  8. @room = 19,
  9. @from = '10:00:00',
  10. @to = '12:00:00'
  11.  
  12.  
  13. exec addDiscountToDay
  14. @percentage = 10,
  15. @daysBefore = 15,
  16. @conferenceDayID = 1
  17.  
  18. select * from Workshop_In_Day
  19. select * from Discount
  20.  
  21. exec addPerson
  22. @firstName = 'Sebastian',
  23. @lastName = 'Gaweł',
  24. @address = 'bbb',
  25. @city = 'Warszawa',
  26. @country = 'Poland',
  27. @phone = 1092433,
  28. @mail = 'mlladaf.com'
  29.  
  30. exec addCompany
  31. @name = 'lepszaFirma',
  32. @address = 'bbb',
  33. @city = 'Lublin',
  34. @Country = 'Poland',
  35. @Phone = 984324945,
  36. @Mail = 'klfjaf.pl',
  37. @Contact_Person = 'Adam Mickiewicz'
  38.  
  39. select * from Company
  40.  
  41. declare @resid int
  42. exec addReservation
  43. @normalTicketCount = 2,
  44. @studentTicketCount = 3,
  45. @clientID = 3,
  46. @conferenceDayID = 1,
  47. @reservationID = @resid
  48.  
  49.  
  50. select * from Reservation
  51.  
  52. select * from Person
  53.  
  54. exec addPersonToReservation
  55. @reservationID = 2,
  56. @personID = 1
  57.  
  58. exec cancelConference
  59. @conferenceID = 1
  60.  
  61. select * from Workshop
  62.  
  63. select * from Conference
  64.  
  65. update Conference
  66. set Is_Cancelled = 0
  67. where Is_Cancelled = 1
  68.  
  69. disable trigger ConferenceDayCancellation on Conference_Day
  70. enable trigger ConferenceDayCancellation on Conference_Day
  71. disable trigger DayConferenceParticipantsLimitChange on Conference_Day
  72. enable trigger DayConferenceParticipantsLimitChange on Conference_Day
  73.  
  74. update Conference_Day
  75. set Is_Cancelled = 0
  76. where Is_Cancelled = 1
  77.  
  78. select * from Conference_Day
  79.  
  80. update Reservation
  81. set Is_Cancelled = 0
  82. where Is_Cancelled = 1
  83.  
  84. select * from Reservation
  85.  
  86. select * from Workshop_Reservation
  87.  
  88. select * from Workshop_Participant
  89. select * from Conference_Day_Participant
  90.  
  91. select * from Person
  92. exec addPersonToReservation
  93. @reservationID = 2,
  94. @personID = 1,
  95. @isStudent = 0
  96.  
  97. exec addPersonToWorkshopReservation
  98. @personID = 1,
  99. @workshopReservationID = 1
  100.  
  101. update dbo.Workshop_Reservation
  102. set Is_Cancelled = 0
  103. where Is_Cancelled = 1
  104.  
  105.  
  106. select * from Workshop_In_Day
  107. select dbo.FreePlacesForWorkshopInDay(3,1)
  108. declare @wshid int
  109. exec addWorkshopReservation
  110. @reservationID = 2,
  111. @workshopID = 3,
  112. @conferenceDayID = 1,
  113. @ticketsCount = 2,
  114. @workshopReservationID = @wshid
  115.  
  116. select * from Workshop_Reservation
  117. select * from Workshop_In_Day
  118.  
  119. update Workshop_In_Day
  120. set Participants_Limit = 1
  121. where Workshop_ID = 3 and Conference_Day_ID = 1
  122.  
  123.  
  124. update Conference_Day
  125. set Participants_Limit = 2
  126. where Conference_Day_ID = 1
  127.  
  128. exec addWorkshopToDay
  129. @workshopID = 1,
  130. @conferenceDayID = 1,
  131. @participantsLimit = 30,
  132. @price = 60,
  133. @room = 14,
  134. @from = '09:50:00',
  135. @to = '19:50:00'
  136.  
  137. declare @wshid int
  138. exec addWorkshopReservation
  139. @reservationID = 2,
  140. @workshopID = 1,
  141. @conferenceDayID = 1,
  142. @ticketsCount = 2,
  143. @workshopReservationID = @wshid
  144.  
  145. select * from Workshop_Reservation
  146.  
  147. select * from Workshop_Participant
  148. select * from Conference_Day_Participant
  149. select * from Conference
  150. exec addPersonToWorkshopReservation
  151. @personID = 1,
  152. @workshopReservationID = 2
  153.  
  154. exec cancelConference
  155. @conferenceID = 1
  156.  
  157. select * from Reservation
  158. select * from Conference
  159. select * from availableConferences
  160. select * from Workshop_In_Day
  161. select * from upcomingWorkshops
  162. select * from availableWorkshops
  163. select * from Personal_Identifier_Badge
  164. select * from DayReservations
  165. select * from CancelledDayReservations
  166. select * from DayReservationsNotFilledWithParticipants
  167. select * from WorkshopReservations
  168. select * from CancelledWorkshopReservations
  169. select * from WorkshopReservationsNotFilledWithParticipants
  170. select * from ReservationsMonetary
  171. select * from ReservationsNotFullyPaidYet
  172. select * from ReservationsOverpaid
  173. select * from ConferencesParticipants
  174. select * from HighestNumberOfReservations
  175. select * from HighestAmountPaidForReservations
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement