×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: T-SQL
Posted by: tausif alam
Added: Jul 26, 2016 10:07 AM
Views: 6
Tags: no tags
  1.  
  2. -- =============================================    
  3. -- Author:  Tausif    
  4. -- Create date: 23/7/2016    
  5. -- Description: Initializes the USER INTERFACE    
  6. -- EXEC USP_INITUI    
  7. -- =============================================    
  8. CREATE PROCEDURE USP_INITUI    
  9. AS    
  10. BEGIN    
  11. SELECT DISTINCT DENSE_RANK() OVER(ORDER BY application) as APPLICATIONID ,APPLICATION FROM issues    
  12. SELECT DISTINCT DENSE_RANK() OVER(ORDER BY STATUS ) AS STATUSID ,STATUS FROM ISSUES    
  13. SELECT DISTINCT DENSE_RANK() OVER(ORDER BY ASSIGNEE) AS OWNERID ,ASSIGNEE AS OWNER FROM issues    
  14. SELECT DISTINCT number as PRIORITYID ,number as PRIORITY FROM master..[spt_values]  WHERE number BETWEEN 1 AND 4    
  15. SELECT DISTINCT DENSE_RANK() OVER(ORDER BY id) AS SRID ,SRNO FROM ISSUES    
  16.    
  17. END