I am working on a project to sync the work emails between my LTM and S3 environments. However, one problem I'm running into is that in LTM, there's no real way to determine which email is the work email versus any of the other emails unless you set the flag IsWorkEmail. however I can find this flag in the background SQL database which is the tool I'm using to perform this sync. Anyone have any methods to help identify work emails from all others and ways to access them directly from the backend database?
Thanks in advance
Dwayne
Thanks Woozy. I'll give that a try. I can't believe I glanced over those fields quite a few times and didn't see that field. Nice to have this place to bounce these questions off of.
@Time - I'm just providing adhoc queries with T-SQL/PL-SQL and transferring information between MSSQL and our Oracle system.
Thanks for the assistance
SELECT e.EMPLOYEE ,e.NGIVENNAME ,e.NFAMILYNAME ,ra.PADAADDRESSLINE1 AS ResAddr1 ,ra.PADAADDRESSLINE2 AS ResAddr2 ,ra.PAMUNICIPALITY AS ResCity ,ra.PASTATEPROVINCE ,ra.PAPOSTALCODE AS ResZip ,ma.PADAADDRESSLINE1 AS MailAddr1 ,ma.PADAADDRESSLINE2 AS MailAddr2 ,ma.PAMUNICIPALITY AS MailCity ,ra.PASTATEPROVINCE AS MailState ,ma.PAPOSTALCODE AS MailZip FROM LANDMARK.LTMTRAIN.EMPLOYEE e LEFT OUTER JOIN LANDMARK.LTMTRAIN.EMPLOYEEADDRESS ra ON e.HRORGANIZATION=ra.HRORGANIZATION AND e.EMPLOYEE=ra.EMPLOYEE AND e.USEFORPAYROLL = ra.EMPLOYEEADDRESS AND ra.ACTIVE = 1 -- only use this if your data entry folks are correctly marking the records as "Active" AND HEX(ra.DELETEFLAG)=REPEAT('0',32) -- this excludes any deleted records LEFT OUTER JOIN LANDMARK.LTMTRAIN.EMPLOYEEADDRESS ma ON e.HRORGANIZATION=MA.HRORGANIZATION ON e.EMPLOYEE=ma.EMPLOYEE AND e.USEFORMAILING = ma.EMPLOYEEADDRESS AND ma.ACTIVE = 1 -- only use this if your data entry folks are correctly marking the records as "Active" AND HEX(ma.DELETEFLAG)=REPEAT('0',32) -- this excludes any deleted records WHERE e.HRORGANZATION = {whatever} and HEX(e.DELETEFLAG)=REPEAT('0',32)