Paradox Community

Items in pnews.paradox-client_server

Subject:Re: OT - SQL Help needed...
Date:Fri, 2 Dec 2016 10:58:53 -0700
From:Liz McGuire <liz@paradoxcommunity.com>
Newsgroups:pnews.paradox-client_server
SELECT DISTINCT ADD.address_uid
       ,ADD.unit_number
       ,ADD.street_number
       ,ADD.street_suffix
       ,ADD.street_name
       ,LOC.locality_uid
       ,LOC.locality_name
       ,LOC.state
       ,LOC.postcode
FROM address_detail ADD
      LEFT JOIN locality LOC ON ADD.locality_uid = LOC.locality_uid
      LEFT JOIN locality_alias ALS ON ALS.primary_locality_uid = 
LOC.locality_uid
WHERE ADD.street_name LIKE 'MAIN%'
AND (LOC.locality_name = 'FREDS TOWN'
OR   (LOC.locality_name != 'FREDS TOWN'
   AND ALS.locality_name = 'FREDS TOWN'));

...?

On 01 Dec 2016 20:06, Liz McGuire wrote:
> SELECT ADD.address_uid
>       ,ADD.unit_number
>       ,ADD.street_number
>       ,ADD.street_suffix
>       ,ADD.street_name
>       ,LOC.locality_uid
>       ,LOC.locality_name
>       ,LOC.state
>       ,LOC.postcode
> FROM address_detail ADD
>      LEFT JOIN locality LOC ON ADD.locality_uid = LOC.locality_uid
>      LEFT JOIN locality_alias ALS ON ALS.primary_locality_uid =
> LOC.locality_uid
> WHERE ADD.street_name LIKE 'MAIN%'
> AND (LOC.locality_name = 'FREDS TOWN'
> OR   ALS.locality_name = 'FREDS TOWN');


Copyright © 2004 thedbcommunity.com