2 Replies Latest reply on Nov 19, 2013 6:41 AM by sonjafroyen

    ExecuteSQL and using COLLATE to be insensitive to case

    sonjafroyen
      Tags in TagTable
      mango
      Mango
      Peach
      peach
      APPLE
      Apple

       

      I want an index of tag values that is INDIFFERENT to upper or lower case.

       

      SELECT DISTINCT Tag FROM TagTable 
      ORDER BY lower(Tag)
      

       

      returns:

       

      APPLE
      Apple
      mango
      Mango
      Peach
      peach
      

       

      I want it to return three values. I don't care what case they are so long as they're listed only once.

       

      I tried adding COLLATE to my statement with either DATABASE_DEFAULT or SQL_Latin1_General_CP1_CI_AS or utf8_bin. All give me a ? as the result.