[dba-Tech] Function gotcha with use of asterisk

Jim Lawrence accessd at shaw.ca
Fri Sep 11 13:52:28 CDT 2009


Thanks for ther tip Max.

Jim

-----Original Message-----
From: dba-tech-bounces at databaseadvisors.com
[mailto:dba-tech-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo
Sent: Friday, September 11, 2009 9:44 AM
To: 'Discussion of Hardware and Software issues'
Subject: [dba-Tech] Function gotcha with use of asterisk

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




_______________________________________________
dba-Tech mailing list
dba-Tech at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-tech
Website: http://www.databaseadvisors.com




More information about the dba-Tech mailing list