UFN_RE7INTEGRATION_GETREALESTATE
Return
Return Type |
---|
table |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | |
@TOPN | int | IN |
Definition
Copy
CREATE function dbo.UFN_RE7INTEGRATION_GETREALESTATE(@ID uniqueidentifier, @TOPN integer = 100)
returns table
as
return
select top (@TOPN)
ID,
dbo.UFN_ADDRESS_CLEAN(PROPADDRESS + ', ' + PROPCITY + ', ' + PROPSTATE) as DESCRIPTION,
PROPERTYVALUATION as VALUE
from
dbo.WPREALESTATE
where
WEALTHID = @ID and CONFIRMED = 1 and HISTORICCODE <> 1
order by
VALUE desc, DESCRIPTION asc;