SELECT DISTINCT RETURNING DUPLICATES

  • Hi,

    I am selecting only one field from the table but it returns duplicate for one value.

    All the values in table

    ans_val1

    ---------------

    No acc3ss

    No access

    No access

    No access

    No access

    No access

    No access

    No access

    No access

    SELECT STATEMENT

    --------------------------------------------

    SELECT DISTINCT

    LTRIM(RTRIM(ans_val1)) AS Answer

    FROM FactTenancyAssesment

    ORDER BY Answer

    RESULT

    ------------

    No acc3ss

    No access

    No access

    Can anyone please help? I have also tried the group by but same results.

    Thanks

  • I found the answer there was an invisible control character in one of the values.

  • great. what hidden character?

  • It was CHAR(9) for tab.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply