Re: Using SetDistinct()

From: Brian Plotner (BPLOTNE..ndependenthealth.com)
Date: Fri Nov 12 2004 - 16:38:19 EST

  • Next message: Andrus Adamchik: "Re: Using SetDistinct()"

    Mike,

    Thanks for the quick response.

    Do you have an alternative to the SetDistinct method to achieve a distinct result?

    Thanks.

    CONFIDENTIALITY NOTICE. This e-mail and attachments, if any, may contain confidential information which is privileged and protected from disclosure by Federal and State confidentiality laws, rules or regulations. This e-mail and attachments, if any, are intended for the designated addressee only. If you are not the designated addressee, you are hereby notified that any disclosure, copying, or distribution of this e-mail and its attachments, if any, may be unlawful and may subject you to legal consequences. If you have received this e-mail and attachments in error, please contact Independent Health immediately at (716) 631-3001 and delete the e-mail and its attachments from your computer. Thank you for your attention.

    >>> Mike Kienenberger <mkienen..laska.net> 11/12/04 03:31PM >>>
    Brian Plotner <BPLOTNE..ndependenthealth.com> wrote:
    > I have a table with one column that contains several rows of repeating
    values and I want to use the SetDistinct method to return only the distinct
    rows.
    >
    > I pass a true to the SetDistinct method but the repeating rows are still
    returned.
    >
    > The query executed in the QueryLogger is:
    >
    > SELECT DISTINCT t0.TABLE_NAME, t0.ETL_MAP_NME_KEY FROM IHA.ETL_MAP_NME t0
    >
    > Does anyone have any ideas as to why this is happening?
    >
    > Any feedback would be greatly appreciated.

    I'm no expert, but I suspect distinct is working on the TABLE_NAME,
    ETL_MAP_MNE_KEY pair rather than just on TABLE_NAME. Since key is probably
    unique for every row, each pair is also unique.

    The behavior of distinct may also vary between databases.

    But again, this is just guesswork on my part.

    -Mike



    This archive was generated by hypermail 2.0.0 : Fri Nov 12 2004 - 16:39:00 EST