Guest User

Untitled

a guest
Dec 7th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. IF ((SELECT COUNT(CAST(StudentuserID AS int)) FROM StudentAttendance WHERE StudentUserID=1)>0)
  2. PRINT 'Yes'
  3. ELSE
  4. PRINT 'No'
  5.  
  6. IF ((SELECT COUNT(CAST(StudentuserID AS int)) FROM StudentAttendance WHERE StudentUserID=1)>0)
  7. UPDATE StudentAttendance
  8. SET
  9. CID = CAST('[querystring:CID]' AS int),
  10. CalendarEventID = CAST('[querystring:CEID]' AS int),
  11. StudentUserID = CAST('[StudentUserID]' AS int),
  12. Attendance = '[Attendance]'
  13. ELSE
  14. INSERT INTO StudentAttendance
  15. (CID,CalendarEventID,StudentUserID,Attendance)
  16. VALUES
  17. (CAST('[querystring:CID]' AS int), CAST('[querystring:CEID]' AS int), CAST('[StudentsUserID]' AS int),'[Attendance]')
Add Comment
Please, Sign In to add comment