vinaynischal14k

procedures

Jul 31st, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 4.19 KB | None | 0 0
  1. /*********************************** procedure to add qualification of user ***********************************/
  2. CREATE PROCEDURE AddQualification @scitid VARCHAR(15), @organization VARCHAR(10), @degree VARCHAR(50), @startyear DATE, @endyear DATE, @RESULT INT OUT
  3. AS 
  4.     INSERT INTO Qualification(SciTID ,Organization,Degree, StartYear, EndYear) VALUES(@scitid, @organization, @degree, @startyear, @endyear)
  5.     SET @RESULT = @@ROWCOUNT
  6. GO  
  7. /******************************************************************************************************************/
  8.  
  9. /*********************************** procedure to add work experience of user ***********************************/
  10. CREATE PROCEDURE AddWorkExperience @scitid VARCHAR(15), @ROLE VARCHAR(50), @Organization VARCHAR(50), @CurrentlyWorkingHere bit, @StartYear DATE, @endyear DATE, @RESULT INT OUT
  11. AS 
  12.     INSERT INTO WorkExperience(SciTID ,[ROLE], Organization,CurrentlyWorkingHere, StartYear, EndYear) VALUES(@scitid, @ROLE,  @organization, @CurrentlyWorkingHere, @startyear, @endyear)
  13.     SET @RESULT = @@ROWCOUNT
  14. GO  
  15. /******************************************************************************************************************/
  16.  
  17.  
  18. /*********************************** procedure to add patents of user ***********************************/
  19. CREATE PROCEDURE AddPatents @scitid VARCHAR(15), @PatentName VARCHAR(50), @PatentNumber VARCHAR(50), @PatentOffice INT, @IssueDate DATE, @PatentStatus VARCHAR(10), @RESULT INT OUT
  20. AS 
  21.     INSERT INTO Patents(SciTID ,PatentName, PatentNumber,PatentOffice, IssueDate, PatentStatus) VALUES(@scitid, @PatentName,  @PatentNumber, @PatentOffice, @IssueDate, @PatentStatus)
  22.     SET @RESULT = @@ROWCOUNT
  23. GO  
  24. /******************************************************************************************************************/
  25.  
  26.  
  27. /*********************************** procedure to add awards of user ***********************************/
  28. CREATE PROCEDURE AddAwards @scitid VARCHAR(15), @AwardTitle VARCHAR(50), @AwardedBy VARCHAR(50), @DateAwarded DATE, @Description VARCHAR(300), @RESULT INT OUT
  29. AS 
  30.     INSERT INTO Awards(SciTID ,AwardTitle, AwardedBy, DateAwarded, [Description]) VALUES(@scitid, @AwardTitle,  @AwardedBy, @DateAwarded, @Description)
  31.     SET @RESULT = @@ROWCOUNT
  32. GO  
  33. /******************************************************************************************************************/
  34.  
  35.  
  36. /*********************************** procedure to add test scores of user ***********************************/
  37. CREATE PROCEDURE AddTestScore @scitid VARCHAR(15), @TestScoreTitle VARCHAR(50), @Organization VARCHAR(50), @Score VARCHAR(3), @PassDate DATE, @Description VARCHAR(300), @RESULT INT OUT
  38. AS 
  39.     INSERT INTO TestScore(SciTID ,TestScoreTitle, Organization, Score, PassDate, [Description]) VALUES(@scitid, @TestScoreTitle, @Organization, @Score, @PassDate, @Description)
  40.     SET @RESULT = @@ROWCOUNT
  41. GO  
  42. /******************************************************************************************************************/
  43.  
  44.  
  45. /*********************************** procedure to add voluntary organization of user ***********************************/
  46. CREATE PROCEDURE AddVoluntaryOrganization @scitid VARCHAR(15), @Designation VARCHAR(25), @Organization VARCHAR(50), @Location INT, @CurrentlyVolunteeringHere bit, @StartYear DATE, @EndYear DATE, @Description VARCHAR(300), @RESULT INT OUT
  47. AS 
  48.     INSERT INTO VoluntaryOrganization(SciTID ,Designation, Organization, [Location], CurrentlyVolunteeringHere, StartYear, EndYear, [Description]) VALUES(@scitid, @Designation, @Organization, @Location, @CurrentlyVolunteeringHere, @StartYear, @EndYear, @Description)
  49.     SET @RESULT = @@ROWCOUNT
  50. GO  
  51. /******************************************************************************************************************/
  52.  
  53.  
  54. /*********************************** procedure to add test scores of user ***********************************/
  55. CREATE PROCEDURE AddPublications @scitid VARCHAR(15), @PaperTitle VARCHAR(50), @DOI VARCHAR(20), @RESULT INT OUT
  56. AS 
  57.     INSERT INTO Publications(SciTID ,PaperTitle, DOI) VALUES(@scitid, @PaperTitle, @DOI)
  58.     SET @RESULT = @@ROWCOUNT
  59. GO  
  60. /******************************************************************************************************************/
Add Comment
Please, Sign In to add comment