Max Wanadoo
max.wanadoo at gmail.com
Fri Sep 11 11:44:23 CDT 2009
Hi All, The u/m Gotcha was posted on sqlservercentral. Below is the opening para. If you want to see code explaining this, etc, you will need a free subscription The home page is: http://www.sqlservercentral.com/ The bug is at: http://www.sqlservercentral.com/articles/User+Defined+Function+%28UDF%29/627 30/ Function gotcha with use of asterisk Introduction During a recent upgrade of our software, I discovered what I assume is a little-known gotcha that I feel appropriate to document and pass on. The gotcha occurs with user-defined table functions (UDFs), when selecting columns from a table using the asterisk (select all) method. The problem then occurs only when columns are subsequently added or removed from the based over table without recreating the function. When these conditions occur, it results in interesting and undesirable output. The SQL below illustrates this problem using SQL 2000. Watch for wrap Max