Try posting this to microsoft.public.sqlserver.programming.
I think they will know how to do this, and if it definitely
can't be done, they'll tell you that, too. I'm assuming this
is SQLServer? I would post the version you are using, as
well as the DDL for creating the tables, or the table
structures.
Robin S.
-----------------------------------
"Ivan Jericevich" <iv**@oberon.co.zawrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
In my code below the result returns two rows. This particular Tenant
occupys 2 Units. How do I join the two rows to give me "Unit1 and
Unit4"
ALTER PROCEDURE dbo.getUnitNumbers
@TenantID int,
@UnitNumber varchar(50) OUTPUT
as
SELECT TOP (8) @UnitNumber = UnitNumber
FROM Area
WHERE (TenantID = @TenantID)
ORDER BY UnitNumber