code_junkie

SQL Table and column Parser for stored procedures

Nov 12th, 2011
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. [...]
  2. @MyDate datetime
  3.  
  4. AS
  5.  
  6. IF (day(@MyDate) = 1)
  7. BEGIN
  8. SELECT * FROM MyFirstTable
  9. RETURN
  10. END
  11.  
  12. IF (@MyDate > getdate())
  13. SELECT MyID, MyText FROM MySecondTable WHERE ADate > @MyDate
  14. ELSE
  15. EXEC Other_StoredProcedure @MyType, @MyDate
Add Comment
Please, Sign In to add comment