Re: Using SetDistinct()

From: Mike Kienenberger (mkienen..laska.net)
Date: Fri Nov 12 2004 - 15:31:17 EST

  • Next message: Brian Plotner: "Re: Using SetDistinct()"

    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 - 15:29:19 EST