To: CF-Talk
> Subject: Re: How to write this query?
>
> On Sun, Apr 13, 2008 at 8:27 AM, Kris Jones <[EMAIL PROTECTED]> wrote:
> > How about something like:
> >
> > select sa.street_number, sa.street_name, sa.city,
> > sa.public_remarks_01, sa.public_
On Sun, Apr 13, 2008 at 8:27 AM, Kris Jones <[EMAIL PROTECTED]> wrote:
> How about something like:
>
> select sa.street_number, sa.street_name, sa.city,
> sa.public_remarks_01, sa.public_remarks_02, sa.public_remarks03,
> sa.list_price,
> (select top 1 sap.photo_filename from smlc_acr_photos sa
How about something like:
select sa.street_number, sa.street_name, sa.city,
sa.public_remarks_01, sa.public_remarks_02, sa.public_remarks03,
sa.list_price,
(select top 1 sap.photo_filename from smlc_acr_photos sap where
sap.photo_mls_number = sa.mls_number) as photo_filename
from smlc_acr sa
order
ame,
> > sap.photo_mls_number from smlc_acr_photos sap ' at line 4"
> >
> > I can't see the error in my syntax. But then, again, I'm not the
> > most experienced "join writer", having avoided them when I could.
> >
> > Tha
p.photo_mls_number from smlc_acr_photos sap ' at line 4"
>
> I can't see the error in my syntax. But then, again, I'm not the
> most experienced "join writer", having avoided them when I could.
>
> Thanks, again.
>
> Rick
>
> > -----Or
ED]
> Sent: Sunday, April 13, 2008 1:45 AM
> To: CF-Talk
> Subject: Re: How to write this query?
>
> something like the following (note: mysql syntax):
>
> SELECT sa.street_number, sa.street_name, sa.city, sa.public_remarks_01,
> sa.public_remarks_02, sa.public_remarks_0
something like the following (note: mysql syntax):
SELECT sa.street_number, sa.street_name, sa.city, sa.public_remarks_01,
sa.public_remarks_02, sa.public_remarks_03, sa.list_price, SAP_SQ.photo_filename
FROM smlc_acr sa INNER JOIN (SELECT photo_filename, photo_mls_number FROM
smlc_acr_photos sap
Hi, all...
I've got two tables:
1 - list of properties
2 - photos for those properties
There is more than one photo per property.
What I want to do is get each property and the first
photo for that property.
Here's what I've tried:
select distinct sa.street_number, sa.street_name, sa.
8 matches
Mail list logo