0 Dynamic Data Block - Proper SQL referencing 'Mobile' phone # ?? 1 Shawn Ross posted 7 Years Ago I have a Dynamic Data Block I'm using with the following 'parameters' for some guest follow-up procedures:Display anyone added to Rock within the last X hoursShow their NameWhat is their email addressWhat is their Mobile Phone #Is SMS enabled on their phone #When were they enteredI have 3 slightly different versions:one that shows SMS-enabled person's (48 hrs entry window)one that shows email person's that don't have SMS enabled (48 hours entry window)one that shows everyone and everything within 72 hours (the catch-all)What I need some clarification and affirmation of:Is my query for only people with a 'mobile' number that's SMS-enabled correct?The SQL I'm using. This is my 'catch-all':(developed in Slack #SQL with @chrisrea, @mikejd, and @paschott)SELECT p.Id , p.NickName + ' ' + p.LastName AS 'Name' , pn.NumberFormatted AS 'phone' , pn.IsMessagingEnabled AS 'SMS Enabled?' , p.Email , p.CreatedDateTimeFROM Person AS pLEFT JOIN PhoneNumber AS pn ON pn.PersonId = p.IdWHERE p.CreatedDateTime >= DATEADD( dd, -3, GETDATE());The SQL query I'm using to limit for those with an SMS-enabled mobile #...is this correct?:SELECT p.Id , p.NickName + ' ' + p.LastName AS 'Name' , pn.NumberFormatted AS 'Mobile phone' , pn.IsMessagingEnabled AS 'SMS Enabled?' , p.Email , p.CreatedDateTime , pn.NumberTypeValueIdFROM Person AS pLEFT JOIN PhoneNumber AS pn ON pn.PersonId = p.IdWHERE p.CreatedDateTime >= DATEADD( dd, -3, GETDATE()) AND pn.IsMessagingEnabled = 1 AND pn.NumberTypeValueId = 12;