[dba-SQLServer]UDFs

Susan Geller sgeller at cce.umn.edu
Tue May 6 11:49:39 CDT 2003


Actually, the stuff in BOL is really comprehensive. Make sure you have
the updated BOL file and if not download it from MS page. The main
benefit that I have found from UDF's is that they return a recordset
that can be referenced as a table.  I use these in sprocs where I need
to pass the input parameter through to another query that is involved in
my sproc.  For example you can do this:

Create proc mySproc

@param1 varchar(10)

Select * from MyUDF(@param1)

Go

--Susan



-----Original Message-----
From: David Lewis [mailto:DavidL at sierranevada.com] 
Sent: Tuesday, May 06, 2003 11:46 AM
To: 'dba-sqlserver at databaseadvisors.com'
Subject: [dba-SQLServer]UDFs


UDFs are something I simply have been unable to wrap my mind around.  I
guess they are a new tool that I have always gotten along without.  Does
anybody have any recommendations for a good, VERY PRACTICAL book or
tutorial on them?  Anybody have any examples close at hand that
demonstrate how useful they are?

TIA  D. Lewis

> 
> 
> ------------------------------
> 
> Message: 5
> Date: Tue, 6 May 2003 12:19:06 -0400
> From: "Arthur Fuller" <artful at rogers.com>
> Subject: RE: [dba-SQLServer]Sproc Output to VB?
> To: <dba-sqlserver at databaseadvisors.com>
> Message-ID: <027e01c313eb$37aa3610$8e01a8c0 at Rock>
> Content-Type: text/plain;	charset="US-ASCII"
> 
> I too find it too cumbersome to write all that front end code
> that creates a
> command object and bla bla bla bla bla. When I need something back,
> typically I write a UDF that returns either a scalar value or a table,
> depending on how many values I need back. The more I use UDFs 
> the more I
> love them.
> 
> Arthur
> 
> -----Original Message-----
> From: dba-sqlserver-bounces at databaseadvisors.com
> [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf
> Of Djabarov,
> Robert
> Sent: May 6, 2003 10:15 AM
> To: dba-sqlserver at databaseadvisors.com
> Subject: RE: [dba-SQLServer]Sproc Output to VB?
> 
> 
> It is not necessarily such a clear cut.  I don't use output
> params at all,
> but rather return the result of action queries in the form of 
> a recordset (1
> row 1 column).  All processing logic sits on the server.
> 
> Robert Djabarov
> Senior SQL Server DBA
> USAA IT/DBMS
> ? (210) 913-3148 - phone
> ? (210) 753-3148 - pager
> > 
_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com



More information about the dba-SQLServer mailing list