Finding Order Settlement Type via DB

Discussions concerning general integration topics.

Moderator: Phil Barton

Post Reply
dlerickson
Posts: 82
Joined: Tue Jan 21, 2014 11:35 am
Location: Austin, TX

Finding Order Settlement Type via DB

Post by dlerickson »

I'm looking for a join path in the Select database to get Settlement Type (HUD/CDF) from pfm.Order. I see the SettlementType and SettlementType@ columns and assume they have some keyed lookup data on the other end of the IDs there, but don't know where to look for the data other end of that join.

I currently have a procedure that pulls order data which is joined with data from an add-on table that we created, and I'd like to be able to add the Settlement Type into the return data set. Thanks.
Phil Barton
Posts: 54
Joined: Wed Sep 24, 2008 2:37 pm
Location: Raleigh, NC
Contact:

Re: Finding Order Settlement Type via DB

Post by Phil Barton »

The SettlementType column does not have a related table in the 'zref' table space to join against. It is mapped against the public enumeration SettlmentType in the SoftPro.OrderTracking.Client.Orders namespace in the SoftPro.OrderTracking.Client assembly. Looking at this enumeration, 0 corresponds to a CDF settlement type and 1 corresponds to a HUD-1 settlement type. So, for your query, you could do something along these lines:

Code: Select all

SELECT o.Number, CASE WHEN o.SettlementType = 0 THEN 'Closing Disclosure' ELSE 'HUD-1' END AS 'Settlement Type'
FROM pfm.[Order] AS o
Phil Barton
Software Architect
SoftPro
Post Reply