Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return into Array
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01329359
Message ID:
01329398
Views:
14
Thank Borislav, Here is the corrected version for the benefit of other.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
CREATE FUNCTION [dbo].[fncPayeeTypeList] (	
	@PayeesFK as INT
)

RETURNS varchar(Max)
as
begin

 DECLARE @PayeeType as varchar(Max)

Select @PayeeType = ISNULL(@PayeeType + char(10), '') + GEN_PayeeTypes.PayeeType FROM GEN_PayeeTypes 
 	left Join
	GEN_PayeeTypeLink
	on GEN_PayeeTypeLink.PayeeTypeFK = GEN_PayeeTypes.PayeeTypePK
WHERE GEN_PayeeTypeLink.PayeesFK = @PayeesFK


 RETURN @PayeeType
end
Gregorio J. Placeres
IT Analyst
Uniform Accounting Network
Auditor of State of Ohio
88 East Broad Street
P.O. Box 1140
Columbus, Ohio 43216-1140

Tel. 614-728-4694

Gregorio_J@MSN.COM

http://www.gjpproductions.com
Previous
Reply
Map
View

Click here to load this message in the networking platform