Help with inner join query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dbrewerton
    New Member
    • Nov 2009
    • 115

    Help with inner join query

    I know I'm missing something below but my eyes are failing to see it. Between these two tables, the common element is contact_id. Can someone lend me a hand please? Thank you

    Code:
    SELECT ewise_device.device_id,ewise_device.contact_id,egw_addressbook.n_fn,
    egw_addressbook.adr_one_locality,egw_addressbook.adr_one_region, 
    ewise_device.device_postalcode FROM ewise_device,egw_addressbook
    INNER JOIN ewise_device.contact_id on 
    (ewise_device.contact_id = egw_addressbook.contact_id) 
    WHERE contact_id IS NOT NULL
  • mwasif
    Recognized Expert Contributor
    • Jul 2006
    • 802

    #2
    [CODE=mysql]SELECT ewise_device.de vice_id,ewise_d evice.contact_i d,egw_addressbo ok.n_fn,
    egw_addressbook .adr_one_locali ty,egw_addressb ook.adr_one_reg ion,
    ewise_device.de vice_postalcode FROM ewise_device
    INNER JOIN egw_addressbook on
    ewise_device.co ntact_id = egw_addressbook .contact_id)
    WHERE contact_id IS NOT NULL[/CODE]

    Comment

    • dbrewerton
      New Member
      • Nov 2009
      • 115

      #3
      Many Thanks :) I really appreciate your help :)

      Comment

      Working...