# Daten

Abfrage:
SHAPE {SELECT TBL_ACCESSOR.NAME AS [Erstellt von], COUNT(TBL_CONTACT.CONTACTID) AS right_Anzahl, TBL_CONTACT.CREATEUSERID AS hide_CreateUserID FROM TBL_CONTACT INNER JOIN TBL_ACCESSOR ON TBL_CONTACT.CREATEUSERID = TBL_ACCESSOR.ACCESSORID WHERE (TBL_CONTACT.COMPANYID IS NULL) AND (TBL_CONTACT.ISPRIVATE = 0) AND (TBL_CONTACT.TYPENUM = 0) AND (TBL_CONTACT.CREATEDATE >= CONVERT (Datetime, '{!RegistryValue, WP_Start}', 104)) AND (TBL_CONTACT.CREATEDATE <= CONVERT (Datetime, '{!RegistryValue, WP_Ende}', 104)) GROUP BY TBL_ACCESSOR.NAME, TBL_CONTACT.CREATEUSERID ORDER BY TBL_ACCESSOR.NAME}  AS EinsDatensatzverwalter APPEND ({Select TBL_CONTACT.FULLNAME As Kontaktname, TBL_CONTACT.CONTACTID As showactcontact_Kontakt, TBL_CONTACT.COMPANYNAME As Firma, TBL_CONTACT.CREATEDATE As [formatshortlocaldate_Erstellt am], TBL_ACCESSOR.NAME As [Erstellt von], TBL_CONTACT.CREATEUSERID As hide_CreateUserID From TBL_CONTACT Inner Join TBL_ACCESSOR On TBL_ACCESSOR.ACCESSORID = TBL_CONTACT.CREATEUSERID Where TBL_CONTACT.COMPANYID Is Null And TBL_CONTACT.ISPRIVATE = 0 And TBL_CONTACT.TYPENUM = 0 And TBL_CONTACT.CREATEDATE >= Convert(Datetime,'{!RegistryValue, WP_Start}',104) And TBL_CONTACT.CREATEDATE <= Convert(Datetime,'{!RegistryValue, WP_Ende}',104) Order By [formatshortlocaldate_Erstellt am] Desc}  AS ZweiKontakte RELATE 'hide_CreateUserID' TO 'hide_CreateUserID') AS ZweiKontakte

Bemerkung:
Kontakte, die mit keinem Firmendatensatz verknüft sind


Abfrage:
SHAPE {Select TBL_USER.USERLOGIN As Verwalter_Firma, Count(Kontaktverwalter.CONTACTID) As [Anzahl unkorrekter Kontaktzuständigkeiten] From TBL_COMPANY Inner Join TBL_USER On TBL_COMPANY.MANAGEUSERID = TBL_USER.USERID Inner Join (Select TBL_USER.USERLOGIN As Verwalter_Kontakt, TBL_CONTACT.COMPANYID, TBL_CONTACT.FULLNAME As Kontakt, TBL_CONTACT.CONTACTID, TBL_CONTACT.ISPRIVATE From TBL_CONTACT Inner Join TBL_USER On TBL_CONTACT.MANAGEUSERID = TBL_USER.USERID Where TBL_CONTACT.ISPRIVATE = 'False' And TBL_CONTACT.TYPENUM = 0) Kontaktverwalter On Kontaktverwalter.COMPANYID = TBL_COMPANY.COMPANYID Where TBL_USER.USERLOGIN <> Kontaktverwalter.Verwalter_Kontakt Group By TBL_USER.USERLOGIN Order By Verwalter_Firma Desc}  AS EinsVerwalter APPEND ({Select TBL_COMPANY.NAME As Firma, TBL_USER.USERLOGIN As Verwalter_Firma, Kontaktverwalter.Kontakt, Kontaktverwalter.Verwalter_Kontakt, Kontaktverwalter.CONTACTID As showactcontact_Kontakt From TBL_COMPANY Inner Join TBL_USER On TBL_COMPANY.MANAGEUSERID = TBL_USER.USERID Inner Join (Select TBL_USER.USERLOGIN As Verwalter_Kontakt, TBL_CONTACT.COMPANYID, TBL_CONTACT.FULLNAME As Kontakt, TBL_CONTACT.CONTACTID, TBL_CONTACT.ISPRIVATE From TBL_CONTACT Inner Join TBL_USER On TBL_CONTACT.MANAGEUSERID = TBL_USER.USERID Where TBL_CONTACT.ISPRIVATE = 'False' And TBL_CONTACT.TYPENUM = 0) Kontaktverwalter On Kontaktverwalter.COMPANYID = TBL_COMPANY.COMPANYID Where TBL_USER.USERLOGIN <> Kontaktverwalter.Verwalter_Kontakt Order By Firma}  AS ZweiKontakte RELATE 'Verwalter_Firma' TO 'Verwalter_Firma') AS ZweiKontakte


Abfrage:
SHAPE {Select TBL_ACCESSOR.NAME As Verwalter, Count(TBL_HISTORY.HISTORYID) As right_Protokollanzahl, Count(TBL_CONTACT_HISTORY.CONTACTID) As right_Kontaktanzahl, TBL_ACCESSOR.ACCESSORID As hide_AccessorID From TBL_HISTORY Inner Join TBL_HISTORYTYPE On TBL_HISTORYTYPE.HISTORYTYPEID = TBL_HISTORY.HISTORYTYPEID Inner Join TBL_ACTIVITYTYPE On TBL_ACTIVITYTYPE.ACTIVITYTYPEID = TBL_HISTORYTYPE.ACTIVITYTYPEID Inner Join TBL_ACCESSOR On TBL_HISTORY.MANAGEUSERID = TBL_ACCESSOR.ACCESSORID Inner Join TBL_CONTACT_HISTORY On TBL_HISTORY.HISTORYID = TBL_CONTACT_HISTORY.HISTORYID Left Join TBL_COMPANY_HISTORY On TBL_HISTORY.HISTORYID = TBL_COMPANY_HISTORY.HISTORYID Inner Join TBL_CONTACT On TBL_CONTACT_HISTORY.CONTACTID = TBL_CONTACT.CONTACTID Where TBL_ACTIVITYTYPE.NAME = '{!RegistryValue, Suchbegriff01}' And TBL_HISTORY.STARTTIME >= Convert(Datetime,'{!RegistryValue, WP_Start}',104) And TBL_HISTORY.STARTTIME <= Convert(Datetime,'{!RegistryValue, WP_Ende}',104) And TBL_COMPANY_HISTORY.COMPANYID Is Null And TBL_CONTACT.COMPANYID Is Not Null Group By TBL_ACCESSOR.NAME, TBL_ACCESSOR.ACCESSORID Order By Verwalter}  AS EinsDatensatzverwalter APPEND (( SHAPE {Select TBL_CONTACT.COMPANYNAME As Firma, TBL_CONTACT.FULLNAME As Kontakt, TBL_CONTACT.CONTACTID As showactcontact_Kontakt, Count(TBL_HISTORY.HISTORYID) As right_Protokollanzahl, TBL_ACCESSOR.ACCESSORID As hide_AccessorID From TBL_HISTORY Inner Join TBL_HISTORYTYPE On TBL_HISTORYTYPE.HISTORYTYPEID = TBL_HISTORY.HISTORYTYPEID Inner Join TBL_ACTIVITYTYPE On TBL_ACTIVITYTYPE.ACTIVITYTYPEID = TBL_HISTORYTYPE.ACTIVITYTYPEID Inner Join TBL_ACCESSOR On TBL_HISTORY.MANAGEUSERID = TBL_ACCESSOR.ACCESSORID Inner Join TBL_CONTACT_HISTORY On TBL_HISTORY.HISTORYID = TBL_CONTACT_HISTORY.HISTORYID Left Join TBL_COMPANY_HISTORY On TBL_HISTORY.HISTORYID = TBL_COMPANY_HISTORY.HISTORYID Inner Join TBL_CONTACT On TBL_CONTACT_HISTORY.CONTACTID = TBL_CONTACT.CONTACTID Where TBL_ACTIVITYTYPE.NAME = '{!RegistryValue, Suchbegriff01}' And TBL_HISTORY.STARTTIME >= Convert(Datetime,'{!RegistryValue, WP_Start}',104) And TBL_HISTORY.STARTTIME <= Convert(Datetime,'{!RegistryValue, WP_Ende}',104) And TBL_COMPANY_HISTORY.COMPANYID Is Null And TBL_CONTACT.COMPANYID Is Not Null Group By TBL_CONTACT.COMPANYNAME, TBL_CONTACT.FULLNAME, TBL_CONTACT.CONTACTID, TBL_ACCESSOR.ACCESSORID Order By Firma}  AS ZweiKontakte APPEND ({Select TBL_ACTIVITYTYPE.NAME As Typ, TBL_HISTORY.STARTTIME As formatshortlocaldate_Datum, TBL_HISTORY.STARTTIME As formatshortlocaltime_Uhrzeit, '' + TBL_HISTORY.REGARDING + '' As Betreff, TBL_HISTORY.DETAILS As rtf2text_Details, TBL_CONTACT.CONTACTID As hide_ContactID, TBL_ACCESSOR.ACCESSORID As hide_AccessorID From TBL_HISTORY Inner Join TBL_HISTORYTYPE On TBL_HISTORYTYPE.HISTORYTYPEID = TBL_HISTORY.HISTORYTYPEID Inner Join TBL_ACTIVITYTYPE On TBL_ACTIVITYTYPE.ACTIVITYTYPEID = TBL_HISTORYTYPE.ACTIVITYTYPEID Inner Join TBL_ACCESSOR On TBL_HISTORY.MANAGEUSERID = TBL_ACCESSOR.ACCESSORID Inner Join TBL_CONTACT_HISTORY On TBL_HISTORY.HISTORYID = TBL_CONTACT_HISTORY.HISTORYID Left Join TBL_COMPANY_HISTORY On TBL_HISTORY.HISTORYID = TBL_COMPANY_HISTORY.HISTORYID Inner Join TBL_CONTACT On TBL_CONTACT_HISTORY.CONTACTID = TBL_CONTACT.CONTACTID Where TBL_ACTIVITYTYPE.NAME = '{!RegistryValue, Suchbegriff01}' And TBL_HISTORY.STARTTIME >= Convert(Datetime,'{!RegistryValue, WP_Start}',104) And TBL_HISTORY.STARTTIME <= Convert(Datetime,'{!RegistryValue, WP_Ende}',104) And TBL_COMPANY_HISTORY.COMPANYID Is Null And TBL_CONTACT.COMPANYID Is Not Null Order By formatshortlocaldate_Datum Desc, formatshortlocaltime_Uhrzeit Desc}  AS DreiProtokolle RELATE 'hide_AccessorID' TO 'hide_AccessorID','showactcontact_Kontakt' TO 'hide_ContactID') AS DreiProtokolle) AS ZweiKontakte RELATE 'hide_AccessorID' TO 'hide_AccessorID') AS ZweiKontakte


# Rubriken

Bemerkung:
Neu angelegte öffentliche Kontakte (ohne Firmenverknüpfung) im Zeitraum: '{!RegistryValue, WP_Start}'  -  '{!RegistryValue, WP_Ende}'  /  Für die Vorgabe des gefilterten Datumsbereiches verwenden Sie das AutoData-Script "SetKIParameter".


Bemerkung:
Der Kontakt-Datensatzverwalter entspricht nicht dem (korrekt gesetzten) Firmen-Datensatzverwalter


Bemerkung:
Zeitraum: '{!RegistryValue, WP_Start}'  -  '{!RegistryValue, WP_Ende}'  /  Protokolltyp: '{!RegistryValue, Suchbegriff01}'  /  Zeigt Kontakthistorien ohne Verknüpfung zu einer Firma. Der Kontakt ist mit einer Firma verknüpft. Typ und Datumsauswahl über AutoData-Script "SetKIParameter".


