Sunday, March 25, 2012

DISTINCT query issue

I'm familiar with MySQL and recently started working with MSSQL.
I have a general understanding of how the DISTINCT command works, but would like to expand on that a bit.

I need to do a DISTINCT query on a record's 'name' column, but i need all of the values for each of those returned records. So, I need the query to only apply the DISTINCT command to the 'name' column, not the other columns of the received records.

Can someone explain a bit how to word this

Many thanks in advance.

EDIT: Upon reflection, I realize now that this request is counter to the way DISTINCT works. D'oh. Move along, nothing to see here. :(

Hi,

As you have wrote at the end of your message, you can not get such a list.

But if you want to get records of having same specific column value, you can run a select and order by over that column also can add a criteria to filter returned data.

No comments:

Post a Comment