Stephen,
> If you want to return a single row for each user, regardless of the number
> of email addresses, you might use ARRAY() with a subquery, eg (haven't
> tested this to make sure it completely works):
Your query worked perfectly!
> Of course, this will return the addresses as a character
To expand on Rob's reply:
If you want to return a single row for each user, regardless of the number
of email addresses, you might use ARRAY() with a subquery, eg (haven't
tested this to make sure it completely works):
SELECT u.*, um.*, ARRAY(SELECT emailaddr FROM user_emailaddrs em WHERE
em.user
My mistake. Should answer these things late at night.
I think you will find that arrays will be your friend[s]
On 02/22/2010 08:51 AM, Gary Chambers wrote:
Rob,
Thanks for the reply...
If you want records for user without email addresses you will need an outer
join on user_emailaddrs
/* un
Rob,
Thanks for the reply...
> If you want records for user without email addresses you will need an outer
> join on user_emailaddrs
>
> /* untested */
> select u.userId, u.lname, u.lastname ,m.startdate, a.emailaddr
> from users u
> join usermetas m on u.userid = m.userid
> left join user_emaila