That was done specifically to enhance the readability of the code.
I check for the existence of a "where clause" sent in the arguments once at the top of the procedure and explicitly define one ( 1=1 ) if there wasn't one sent in.
That way in the next 5 spots in the code where I need to use that variable to build an SQL statement to exec, I can write simply:
... + 'where ' + @where_clause +...
instead of having to have additional code in each of those 5 spots to check if I have a where_clause or not.
Looking at it now I suppose I could have just pre-pended the 'where ' onto the clause itself or left it set to '' and it would have worked just as well.
The details of his new salary are on his blog at:
http://www.wholefoods.com/blogs/jm/archives/2006/1 1/compensation_at_1.html
The applicable section:
Beginning on January 1, 2007, my salary will be reduced to $1 per year and I will no longer take any other cash compensation at all. I will continue to receive the same benefits that all other Team Members receive, including the food discount card and health insurance. The intention of the Board of Directors is for Whole Foods Market to donate all the future stock options I would be eligible to receive to our two company foundations - The Whole Planet Foundation and The Animal Compassion Foundation. In case there is some technical, tax, or legal reason why these stock options cannot be given to our two foundations, then I will retain future option grants and will pledge to donate 100% of the gain from those options to the foundations. This donation of future options received doesn't apply to the stock options already issued to me prior to January 1, 2007.
One other important item to communicate to you is, in light of my decision to forego any future additional cash compensation, our Board of Directors has decided that Whole Foods Market will contribute $100,000 annually to a new Global Team Member Emergency Fund. This money will be distributed to Team Members throughout the company based on need when disasters occur (such as Hurricane Katrina last year). The money will be placed in a special account and any money not distributed in any particular year will roll over and be added to the following year's contribution. We are still working on the exact way Team Members will be able to access this money. The first $100,000 will be deposited on January 1, 2007. (I added the highlighting)
Not many CEO's behaving that way these days.
Disclaimer:
I work at WFM in the IT group, so now I make more than the CEO does.:-)
That was done specifically to enhance the readability of the code.
I check for the existence of a "where clause" sent in the arguments once at the top of the procedure and explicitly define one ( 1=1 ) if there wasn't one sent in.
That way in the next 5 spots in the code where I need to use that variable to build an SQL statement to exec, I can write simply:
instead of having to have additional code in each of those 5 spots to check if I have a where_clause or not.
Looking at it now I suppose I could have just pre-pended the 'where ' onto the clause itself or left it set to '' and it would have worked just as well.
I blame the wine! :-)
CoderDude
At least it is where I work. :-)
Here's an example of a recent SQL Server 2005 stored procedure named pivot_table.
CoderDudeOne other important item to communicate to you is, in light of my decision to forego any future additional cash compensation, our Board of Directors has decided that Whole Foods Market will contribute $100,000 annually to a new Global Team Member Emergency Fund. This money will be distributed to Team Members throughout the company based on need when disasters occur (such as Hurricane Katrina last year). The money will be placed in a special account and any money not distributed in any particular year will roll over and be added to the following year's contribution. We are still working on the exact way Team Members will be able to access this money. The first $100,000 will be deposited on January 1, 2007. (I added the highlighting)
Not many CEO's behaving that way these days.
Disclaimer: :-)
CoderDudeI work at WFM in the IT group, so now I make more than the CEO does.