Posted by Chicagoboy27 on 10/17/06 16:11
i think i might have found a solution that works
SELECT DISTINCT id
FROM address_demo
WHERE (id NOT IN
(SELECT type
FROM address_demo AS
address_demo_1
WHERE (id = @ID)))
ORDER BY type
On Oct 17, 10:30 am, "Chicagoboy27" <jeremy.b...@gmail.com> wrote:
> I have a table. In the table I have different types of mailing
> addresses. The addresses are linked by and ID. ex,
>
> addresses per ID 1
> ID address
> 1 add2
> 1 add3
> 1 add4
>
> distinct Addresses in table
> ID address
> 1 add2
> 1 add3
> 1 add4
>
> What I am trying to figure out is if this is possible. Is it possible
> to figure out some how with a query that in the above example ID 1
> is missing add1. I am trying to populate a dropdown list in my code
> with just the addresses that are left from the distinct list. I tried
> doing an intersect something like this but that did not seem to work.
>
> SELECT type
> FROM address_demo
> INTERSECT
> SELECT type
> FROM address_demo AS address_demo_1
> WHERE progid = '12954892'
>
> I am wondering if I am moving in the right direction or if this is even
> possible......
>
> Thanks
Navigation:
[Reply to this message]
|