-
Functions
What user created function would I use
inline,
scalar,
or table,
to perform this
Select
--This would be the function.
BuildDisplayName tbl.FirstName, tbl.LastName as [DispalyName],
--
Address1,
Address2,
City,
State,
etc
from tableA as tbl
where tbl.ID = 5
-
Re: Functions
scalar:
CREATE FUNCTION dbo.ufn_BuildDisplayName(
--The last name, first name and middle initial
@LastName varchar(75)
, @FirstName varchar(75)
, @MiddleInitial char(1) = NULL
)
--This function returns the email address according to Hyperion standards
RETURNS varchar(200)
AS
BEGIN
DECLARE @DisplayName varchar(200)
SET @DisplayName =
you logic here
RETURN @DisplayName
END
GO
then the call w/b
Select
dbo.ufn_BuildDisplayName( tbl.FirstName, tbl.LastName ) as [DispalyName],
Address1,
Address2,
City,
State,
etc
from tableA as tbl
where tbl.ID = 5
--
HTH,
David Satz
Principal Web Engineer
Hyperion Solutions
"s" <srr@gksys.com> wrote in message news:3edb7177$1@tnews.web.devx.com...
>
> What user created function would I use
> inline,
> scalar,
> or table,
>
> to perform this
>
> Select
> --This would be the function.
> BuildDisplayName tbl.FirstName, tbl.LastName as [DispalyName],
> --
> Address1,
> Address2,
> City,
> State,
> etc
> from tableA as tbl
> where tbl.ID = 5
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks