February 7, 2013 at 3:55 pm
I've had to correct views I've inherited that used select * and returned many unneeded columns. A quick and dirty way to correct them is to right click a view, select Open, select the 'show sql pane' button in the toolbar, and add to the displayed query WHERE 1=0 (or something of the like). I click the exclamation point and the resulting sql query string now explicitly shows all columns. You can now copy this and alter your view in a normal ssms window. It is a time saver when the view returns tens of columns.
----------------------------------------------------
February 11, 2013 at 3:46 am
Nince question,Thank you Steve.
“When I hear somebody sigh, ‘Life is hard,’ I am always tempted to ask, ‘Compared to what?’” - Sydney Harris
February 11, 2013 at 7:08 am
Nice question.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
February 26, 2013 at 6:38 am
Really good one! Didn't know about the SP but got it right through exclusion- of course, the only really correct answer wasn't offered.
(drop this badly designed view and fire any dev that complains about his app crashing as a result)
Viewing 4 posts - 31 through 33 (of 33 total)
You must be logged in to reply to this topic. Login to reply