Subquery help for the sql defficient

C

chard

Looking for a little help with what is probably a simple problem.
I am looking to create a subquery that returns all columns in a table
but for only a subset of the total records. If I run a simple query
and return two fields [s duns#] and [add_1] I return all records in
the dataset 2400ish. the [s duns#] represents a specific company site.
I would like to return a single combination of [s duns#] and [add_1]
for each unique [s duns#], but since there are multiple formats for
each address I don't have uniqueness. Which address is picked doesn't
really matter, I simply want to return one address for each unique [s
duns#]

Then I want to return all the fields in the table for that [s duns#]
[add_1] combo.

Any help would be great!

Rich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top