proper use of SelectDb.pfm.Entity

Discussions concerning general integration topics.

Moderator: Phil Barton

Post Reply
joe.mag
Posts: 122
Joined: Thu Aug 04, 2011 3:11 pm

proper use of SelectDb.pfm.Entity

Post by joe.mag »

Select 4.0

I've read elsewhere that all the GUIDs that used to be in the entity tables now reside in the SelectDb.pfm.Entity table. I believe I've got the correct join syntax to get the GUID for any entity in the database but want to be sure.

Would this be the correct way to get the GUID for a SelectDb.pfm.Order record:

Code: Select all

select e.Guid# from SelectDb.pfm.[Order] o inner join SelectDb.pfm.Entity e on e.RootId# = o.RootId# and o.Id# between e.Id# and e.LastId#
?
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: proper use of SelectDb.pfm.Entity

Post by John Morris »

Use the pf.OrderInfo table for the order guid. It is faster.
John Morris
Sr. Software Architect
SoftPro
joe.mag
Posts: 122
Joined: Thu Aug 04, 2011 3:11 pm

Re: proper use of SelectDb.pfm.Entity

Post by joe.mag »

Thanks--good to know. But I'm also looking for a more generic solution. So if I want the GUID for a property could I simply replace pfm.Property for pfm.Order in my query and achieve that?
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: proper use of SelectDb.pfm.Entity

Post by John Morris »

Yes, but you don't need the between operation. Just join on rootid# and id#.
John Morris
Sr. Software Architect
SoftPro
Post Reply