Debasis Mohapatra

Debasis Mohapatra

  • 1.6k
  • 376
  • 20.9k

Out of four option choose the one answer agnist the question

Feb 22 2019 4:52 AM
I have three table 
stype table,question table and the final table is fivesquestiondetails.
both the primay key id i have inserted in fivesquestiondetails table. Please check the my below store procedure code.
  1. CREATE PROCEDURE [dbo].[questionrecords]  
  2. AS  
  4. BEGIN  
  5. BEGIN TRY  
  6. BEGIN  
  7. select distinct q.question_name as 'Question',qd.question_option as 'Option', from [dbo].[five_s_question] q inner join  
  8. [dbo].[five_s_question_details] qd on inner join [dbo].[five_s_sitetype] s on  
  9. END  
  10. END TRY  
  12. DECLARE @ErrorMessage VARCHAR(MAX);  
  13. SELECT @ErrorMessage ='There was a problem trying to Retrieve Course Type'  
  14. Char(13) + Char(10) + 'The error was: ' + Char(13) + Char(10) + ERROR_MESSAGE()  
  15. RAISERROR (@ErrorMessage, 16, 1)  
  16. END CATCH  
  17. END  
  18. --exec questionrecords
three tables 
id, name, cbu, doc, mbu, dom
id, question_name, weightage, stype_id, cbu, doc, mbu, dom, qstatus
id, question_id, question_option, details_weightage, stype_name, stype_id, cbu, doc, mbu, dom

Brought to you by:

Answers (4)