Is the Server Explorer Hiding a Serious Problem?

| No TrackBacks

I’ve spent the last twenty years or so warning about the problems of SELECT * in queries but Peter Blackburn recently reminded me that a SELECT * in a View is worse. I have an article in the works that explains why in some detail, but I wanted to make developers using Visual Studio or SQL Server Management Studio (SSMS) know that if they have a SELECT * imbedded in a View, they won’t find it—at least not with the VS or SSMS Query editor (QE). The problem is, the QE automatically converts any ambiguous reference like SELECT * into the actual columns when it parses and displays the query. Unless you save this refactored SQL, the original ambiguous SQL remains in place to cause havoc later—and it will.

So, how do you find out if a View has an imbedded SELECT *?

It’s easy (as long as you don’t depend on the Server or Object explorers).

image

No TrackBacks

TrackBack URL: http://betav.com/blogadmin/mt-tb.cgi/2365

Pages

Powered by Movable Type 4.21-en

About this Entry

This page contains a single entry by William Vaughn published on March 19, 2009 10:37 AM.

Handling Report (RDL) Filters was the previous entry in this blog.

Finally Installed: SQL Server 2005 SP3 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.