Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1234

Updating Views Expand / Collapse
Author
Message
Posted Thursday, February 07, 2013 3:55 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 2:06 PM
Points: 225, Visits: 700
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.
Post #1417378
Posted Monday, February 11, 2013 3:46 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: 2 days ago @ 2:32 AM
Points: 937, Visits: 1,154
Nince question,Thank you Steve.

“When I hear somebody sigh, ‘Life is hard,’ I am always tempted to ask, ‘Compared to what?’” - Sydney Harris
Post #1418290
Posted Monday, February 11, 2013 7:08 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:25 AM
Points: 7,070, Visits: 12,523
Nice question.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1418401
Posted Tuesday, February 26, 2013 6:38 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, October 14, 2013 2:15 AM
Points: 32, Visits: 34
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)
Post #1424057
« Prev Topic | Next Topic »

Add to briefcase «««1234

Permissions Expand / Collapse