2 Replies Latest reply: Jul 2, 2012 6:30 PM by 946493 RSS

    Need help building query

    946493
      I have a database with 100s of tables but there are three I need to extract data from:

      BWAS.AS_USER
      user_uid
      cust_group_uid
      user_id

      BWAS.DN
      dn_uid
      dn
      svc_provider_uid
      cust_group_uid
      user_uid

      BWAS.SVC_PROVIDER
      svc_provider_uid
      svc_provider_id
      name
      support_email

      What I want to do is output the following:

      DN (from BWAS.DN), USER_UID (from BWAS.AS_USER), SVC_PROVIDER_ID, SUPPORT_EMAIL (both from BWAS.SVC_PROVIDER)
      but only when the USER_UID field in BWAS.DN is not null

      I'm not sure how to tie the three tables in together. I can get the output from two tables not three.

      Any help would be gratefully received.