You are here: Re: how to recompile / refresh UDFs ? « MsSQL Server « IT news, forums, messages
Re: how to recompile / refresh UDFs ?

Posted by Erland Sommarskog on 03/22/07 22:48

Ben (benblo@gmail.com) writes:
> I heard about the "select * is bad practice", but I'm dealing with a
> constantly evolving database (not yet in production), so I use a lot
> of it to just pump everything and send it back to webpages. And even
> if I didn't all that would mean is I'd have to manually go into every
> function and update them, which is exactly what I've been doing so far
> (open, backspace to alter, save --seems to be the only way to
> refresh).

Not really. If you have everything under version control, or at least
on disk, you can easily run a BAT file that loads all functions it can
find. The database is no place for source code; in my opinion that is
only a container for binaries.

And while it may seem easy to have SELECT *, it does come back and bite
you. As I understood, you got this problem because you changed the column
order. If you had used explicit column lists, you could just have
changed the column lists, and you would have to change the underlying
tables.

I work with a constantly evolving database, for over ten years now. One
thing I hate is to find a stored procedure to return about every column
in a table. Then I have to dig further into the client code so see if
the column I want to drop or redefine is actually use somewhere. So there
are very good reasons to only return the columns that actually are
in use. This makes it much easier to track down where things are used.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация