Hi,
How can i pass Table data type parameter to UDF ?You can't but there's probably another solution (using joins for example).
If you need more help, describe the problem with DDL, sample data and
required results.
David Portas
SQL Server MVP
--|||A few methods to pass table data into a user defined function or stored
procedure:
1 - Use persistant tables or views. You pass the selection criteria as
variables. Requires you to define your datasets you would want to pass
before hand.
2 - Use a temporary table. The table and column names must be predefined
and the table must be built before calling the function.
3 - Use a text or varchar variable with delimiters to pass a single column
worth of data. Limit of 8000 characters.
4 - Use dynamic SQL. Security, speed and integrity problems arise with
dynamic SQL.
A few questions to ask before deciding what approach to take:
- What is the maximum number of rows to pass?
- Is more then one column required?
- Does the data being passed require indexing?
- Who will be using the funtion and what rights do they have?
"DMP" <debdulal.mahapatra@.fi-tek.co.in> wrote in message
news:%230w4L2RZFHA.1368@.tk2msftngp13.phx.gbl...
> Hi,
> How can i pass Table data type parameter to UDF ?|||Just to add to that, you can also send an XML doc:
http://msdn.microsoft.com/library/d... />
ql01c5.asp
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"tygrus" <tygrus@.user.net> wrote in message
news:e9YAVLcZFHA.3712@.TK2MSFTNGP09.phx.gbl...
A few methods to pass table data into a user defined function or stored
procedure:
1 - Use persistant tables or views. You pass the selection criteria as
variables. Requires you to define your datasets you would want to pass
before hand.
2 - Use a temporary table. The table and column names must be predefined
and the table must be built before calling the function.
3 - Use a text or varchar variable with delimiters to pass a single column
worth of data. Limit of 8000 characters.
4 - Use dynamic SQL. Security, speed and integrity problems arise with
dynamic SQL.
A few questions to ask before deciding what approach to take:
- What is the maximum number of rows to pass?
- Is more then one column required?
- Does the data being passed require indexing?
- Who will be using the funtion and what rights do they have?
"DMP" <debdulal.mahapatra@.fi-tek.co.in> wrote in message
news:%230w4L2RZFHA.1368@.tk2msftngp13.phx.gbl...
> Hi,
> How can i pass Table data type parameter to UDF ?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment