Jump to content

SELECT LEFT JOIN (return array of right table as well?)


Recommended Posts

Table 1

 

Name / ID

 

Dave / 1

John / 2

Steve / 3

 

 

Table 2

 

ID / Lat / Long / region

1 / 32.0054 / -3.4562 / 1

1 / 27.5054 / -23.4563 / 1

1 / 66.8734 / 1.8764 / 2

2 / 34.4474 / -2.4562 / 1

 

I need it to return ALL people that have records in table 2 and have a matching region - but I want only one record (LEFT JOIN) but so an array of all right (table 2) table records are returned

 

When selecting region 1, it returns...

 

Dave = array of 32.0054,-3.4562 & 27.5054 / -23.4563

John = just 34.4474 / -2.4562

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.