Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.2 KiB

  1. SET QUOTED_IDENTIFIER ON
  2. GO
  3. SET ANSI_NULLS ON
  4. GO
  5. CREATE PROCEDURE sp_LookupBucket
  6. @s_BucketId varchar(100)
  7. AS
  8. BEGIN
  9. DECLARE @i_Bug int
  10. DECLARe @s_SolText varchar (4000)
  11. DECLARE @d_SolDate DATETIME
  12. DECLARE @s_SolvedBy varchar (30)
  13. DECLARE @s_Comment varchar (1000)
  14. DECLARE @s_OSVersion varchar (30)
  15. DECLARE @s_CommentBy varchar (30)
  16. DECLARE @iBucket AS int
  17. SELECT @iBucket = iBucket FROM BucketToInt
  18. WHERE BucketId = @s_BucketId
  19. -- Get the Raid bug
  20. SELECT @i_Bug = BugId FROM RaidBugs
  21. WHERE iBucket = @iBucket
  22. -- Get The solution
  23. SELECT @s_SolText = SolText,
  24. @s_SolvedBy = SolvedBy,
  25. @d_SolDate = SolveDate,
  26. @s_OSVersion = OSVersion
  27. FROM Solutions, SolutionsMap as sm
  28. WHERE iBucket = @iBucket AND sm.SolId = Solutions.SolId
  29. -- get the comment
  30. SELECT @s_Comment = Comment, @s_CommentBy = CommentBy FROM Comments, CommentMap
  31. WHERE iBucket = @iBucket AND Comments.CommentId = CommentMap.CommentId
  32. -- Output values
  33. SELECT @i_Bug AS Bug,
  34. @s_SolText AS SolText,
  35. @d_SolDate AS SolDate,
  36. @s_SolvedBy AS SolvedBy,
  37. @s_Comment AS Comment,
  38. @s_OSVersion AS OSVersion,
  39. @s_CommentBy AS CommentBy
  40. END
  41. GO
  42. SET QUOTED_IDENTIFIER OFF
  43. GO
  44. SET ANSI_NULLS ON
  45. GO