I'm trying to find unique rows based on three different columns
Here is the query I've written but I get an error
Syntax error (missing operator) in query expression 'row_number() OVER ( partition BY F1, F2,F3 order by F1)
Here is the query
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
Can someone please figure out what's wrong with this query?
I'm using this query in a C# program to extract data from an Excel sheet using oledb. Thanks in advance.
Here is my C# code
OleDbDataAdapter data = new OleDbDataAdapter(query, conn);
data.Fill(ds);