Syntax
1 TopicSyntax Error Help
I am trying to get data from 5 tables to show as one and if I just limit it to 2 tables this works, but when I add the further columns to select and the further tables to get the data from it fails. I am new to SQL and this is a massive learning curve for me. Please can someone sort this statement for me: SELECT A.ID, A.EXTERNAL_IDENTIFIER, A.FIRST_NAME, A.LAST_NAME, A.BIRTH_DATE, B.STATE_PROVINCE_ID, C.ASSISTANCE_DOG_NAME_8, C.DATE_OF_BIRTH_9, C.COLOUR_11, D.INVISIBLE_DISABILITIES_142, D.NON - VERBAL_148, D.HEARING_IMPAIRMENT_143, D.SIGHT_LOSS_144, D.BLADDER_BOWEL_WEAKNESS_ILLNESS_145, D.MOBILITY_146, E.END_DATE, E.MEMBERSHIP_TYPE_ID FROM `CiviCRM-3134371907`.civicrm_contact A, `CiviCRM-3134371907`.civicrm_address B, `CiviCRM-3134371907`.civicrm_value_assistance_do_2 C, `CiviCRM-3134371907`.civicrm_value_medical_condi_3 D, `CiviCRM-3134371907`.civicrm_membership E WHERE A.ID = B.ID, A.ID = C.ENTITY_ID, A.ID = D.ENTITY_ID, A.ID = E.CONTACT_ID; Update: It says the error is in the WHERE statement, but I don't know how to fix it565Views0likes0Comments