Advertisement
Guest User

Untitled

a guest
Apr 25th, 2014
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. ALTER PROCEDURE dbo.get_steps_detail
  2. @proj_id int
  3. AS
  4. BEGIN
  5. SET NOCOUNT ON
  6. SELECT step_date, step_stat
  7. FROM steps_table
  8. WHERE proj_id = @proj_id ORDER BY step_num
  9. END
  10.  
  11. Running [dbo].[get_steps_detail] ( @proj_id = 1 ).
  12.  
  13. step_date step_stat
  14. ------------------------------ ---------------------------------------------------------
  15. 2014-02-06 00:00:00.0000000 1
  16. 2014-01-30 00:00:00.0000000 1
  17. 2014-01-30 00:00:00.0000000 1
  18. 2014-01-30 00:00:00.0000000 1
  19. No rows affected.
  20. (4 row(s) returned)
  21. @RETURN_VALUE = 0
  22. Finished running [dbo].[get_steps_detail].
  23.  
  24. SELECT step_date, step_stat
  25. FROM steps_table
  26. WHERE (proj_id = 1)
  27. ORDER BY step_num
  28.  
  29. 2/6/2014 1
  30. 1/30/2014 1
  31. 1/30/2014 1
  32. 1/30/2014 1
  33.  
  34. SELECT CAST(step_date AS DATE) ...
  35.  
  36. SELECT DATEPART(year, step_date) AS step_date_year, DATEPART(month, step_date) AS step_date_month, DATEPART(day, step_date) AS step_date_day
  37.  
  38. <asp:Label ID="Label1" runat="server" ><%# Eval("step_date_year")%> - <%# Eval("step_date_month")%> - <%# Eval("step_date_day")%></asp:Label>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement