on-internet
← Community

SELECT DISTINCT in DataView's RowFilter

Stack Overflow ·

I'm trying to narrow down the rows that are in my DataView based on a relation with another table, and the RowFilter I'm using is as follows; dv = new DataView(myDS.myTable, "id IN (SELECT DISTINCT parentID FROM myOtherTable)", "name asc", DataViewRowState.CurrentRows); "myTable" and "myOther" table are related via myTable.ID and myOtherTable.parentID, and so the idea is that the DataView should only contain rows from "myTable" which have corresponding child rows in "myOtherTable". Unfortunately, I'm getting this error; Syntax error: Missing operand after 'DISTINCT' operator. The SQL is fine a

Comments

Sign in or sign up to comment and upvote.

No comments yet.