title: Sql Query giving error missing operator while using row_number in it
body: <p>I'm trying to find unique rows based on three different columns</p>
  
  <p>Here is the query I've written but I get an error</p>
  
  <blockquote>
    <p>Syntax error (missing operator) in query expression 'row_number() OVER ( partition BY F1, F2,F3 order by F1)</p>
  </blockquote>
  
  <p>Here is the query</p>
  
  <pre><code>SELECT F1, F2, F3 
  FROM
     (SELECT  
          *, 
          ROW_NUMBER() OVER (PARTITION BY F1, F2, F3 ORDER BY F1) AS rn 
      FROM 
          tblName) a 
  WHERE rn = 1
  </code></pre>
  
  <p>Can someone please figure out what's wrong with this query?</p>
  
  <p>I'm using this query in a C# program to extract data from an Excel sheet using oledb. Thanks in advance.</p>
  
  <p>Here is my C# code </p>
  
  <pre><code>OleDbDataAdapter data = new OleDbDataAdapter(query, conn);
  data.Fill(ds);
  </code></pre>