title: Performing SQL select distinct except BLOB field
body: <p>I need to select some DISTINCT fields on a table, but I need to exclude blobs from the distinct, since distinct does not consider BLOB fields.</p>
  <p>I tried looking for something here, but <a href="https://stackoverflow.com/questions/26721525/oracle-how-can-i-perform-a-select-distinct-on-all-fields-except-a-blob">this</a> is what I found and it doesn't work for me,</p>
  <pre><code>Invalid token.
  Dynamic SQL Error.
  SQL error code = -104.
  Token unknown - line 3, column 76.
  (.
  ----------------------------------
  SQLCODE: -104
  SQLSTATE: 42000
  GDSCODE: 335544569
  </code></pre>
  <p>This is the query I used (I modified names since it's from work)</p>
  <pre><code>SELECT Field1, Field2, Field3, Blob1, Blob2
  FROM (     
    SELECT Field1, Field2, Field3, Blob1, Blob2, row_number() over (partition by Field1, Field2, Field3 order by Field1) RW
    FROM Table
  ) WHERE RW = 1;
  </code></pre>
  <p>Is there any other way to do it other than the one suggested in that article?</p>