Friday, July 19, 2013

Find Records/Tables within a Default Message - PERSON_BASIC_SYNC - Sample SQL

Provide a listing of records for a particular message.  This example is PERSON_BASIC_SYNC.



SELECT DISTINCT C.recname,
                D.rectype "Tables Only",
                C.msgname,
                A.defaultver
FROM   psmsgdefn A,
       psmsgver B,
       psmsgrec C,
       psrecdefn D
WHERE  A.msgname = B.msgname
       AND A.defaultver = B.apmsgver
       AND C.msgname = B.msgname
       AND C.apmsgver = B.apmsgver
       AND D.recname = C.recname
       AND D.rectype = 0
       AND A.msgname = 'PERSON_BASIC_SYNC'
ORDER  BY C.recname ASC 

RECNAME Tables Only MSGNAME DEFAULTVER
ADDRESSES 0 PERSON_BASIC_SYNC INTERNAL
EMAIL_ADDRESSES 0 PERSON_BASIC_SYNC INTERNAL
NAMES 0 PERSON_BASIC_SYNC INTERNAL
NATIONALITY_GER 0 PERSON_BASIC_SYNC INTERNAL
PERSON 0 PERSON_BASIC_SYNC INTERNAL
PERSONAL_PHONE 0 PERSON_BASIC_SYNC INTERNAL
PERSON_BRA 0 PERSON_BASIC_SYNC INTERNAL
PERSON_FRA 0 PERSON_BASIC_SYNC INTERNAL
PERSON_SA 0 PERSON_BASIC_SYNC INTERNAL
PERS_DATA_BRA 0 PERSON_BASIC_SYNC INTERNAL
PERS_DATA_CAN 0 PERSON_BASIC_SYNC INTERNAL
PERS_DATA_CHE 0 PERSON_BASIC_SYNC INTERNAL
PERS_DATA_DEU 0 PERSON_BASIC_SYNC INTERNAL
PERS_DATA_EFFDT 0 PERSON_BASIC_SYNC INTERNAL
PERS_DATA_ESP 0 PERSON_BASIC_SYNC INTERNAL
PERS_DATA_FPS 0 PERSON_BASIC_SYNC INTERNAL
PERS_DATA_FRA 0 PERSON_BASIC_SYNC INTERNAL
PERS_DATA_IND 0 PERSON_BASIC_SYNC INTERNAL
PERS_DATA_ITA 0 PERSON_BASIC_SYNC INTERNAL
PERS_DATA_JPN 0 PERSON_BASIC_SYNC INTERNAL
PERS_DATA_MEX 0 PERSON_BASIC_SYNC INTERNAL
PERS_DATA_USA 0 PERSON_BASIC_SYNC INTERNAL
PERS_DATA_USF 0 PERSON_BASIC_SYNC INTERNAL
PERS_HUKOU_CHN 0 PERSON_BASIC_SYNC INTERNAL
PERS_NID 0 PERSON_BASIC_SYNC INTERNAL
PERS_SMOKER 0 PERSON_BASIC_SYNC INTERNAL
PERS_WRKLIF_CHN 0 PERSON_BASIC_SYNC INTERNAL
PERS_WRKLV_CHN 0 PERSON_BASIC_SYNC INTERNAL
PLACE_ORIG_CHE 0 PERSON_BASIC_SYNC INTERNAL





No comments: