
March 31st, 2005, 06:40 PM
|
|
Contributing User
|
|
Join Date: Oct 2004
Location: Texas
Posts: 169
Time spent in forums: 1 Day 9 h 36 m 57 sec
Reputation Power: 5
|
|
|
Thanx Mennoch RE: Comments in stored procedure
Thanks Mennoch…. I did my homework
You were right about comments in stored procedures. If you create a stored procedure using the Create or Alter procedure statement all comments will be saved. I was using an Access project where you can open the stored procedures in a GUI query design view for procedures where the sql can be graphically displayed. The procedure will initially open with all the comments showing in the sql window, but if you make any changes to that procedure by using the GUI interface instead of just entering the sql, some or all of the comments are moved to the top of the procedure before the alter statement. Depending on how may changes you make using GUI determines how many of the comments are saved - I guess.
As far as Views with comments, the view won't be graphically displayed in the design view of enterprise manager and you still can't see the comments even in the sql window. If you script the object in query analyzer the comments are there! In an Access project you can open the same view and it will be graphically displayed but without the comments. If you make any changes to the view in the Access GUI the same thing happens as with procedures - some or all or none of the comments are moved before the Alter statement if you script the view.
If I can do the same thing in both, which would be better to use a query or a view? The sp or view would be used for an MS Access reports database and would return about 10,000 rows but filters would be applied to the reports based on the user's input. The view or SP would have one case statement and several date computations with 17 fields returned.
I already know I can just apply a filter to a view which would be easy, but If I use an sp I'll have to deal with parameters. What would be more effective?
Thanks
|