Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Please Help!!! BindingSource.Filter
 

Please Help!!! BindingSource.Filter

I've asked this in a few forums but no solution. Maybe this is the correct forum. I'm looking to find duplicate records but I can't seem to get thebindingsource to do so. I'm looking for something like this: (where ssn is my column name....)

mybindingsource.Filter = "ssn HAVING COUNT > 1"

I want to return only records that have two or more ssn's. I know the Sort can handle DESC or ASC, but does Filter have any key words? Should I be using a different method?

Thanks in advance!

EZ1976  Thursday, January 18, 2007 6:30 PM

You canachieve this by using a sql as:

select * from table where ssn in
(
select ssn
from table
group by ssn
having count(*) >1
)

but a RowFilter cannot contain a sub query,

For more information about RowFilter expression, read THIS.

Best Regards,

Ye

Zhi-Xin Ye  Friday, January 19, 2007 5:24 AM

You canachieve this by using a sql as:

select * from table where ssn in
(
select ssn
from table
group by ssn
having count(*) >1
)

but a RowFilter cannot contain a sub query,

For more information about RowFilter expression, read THIS.

Best Regards,

Ye

Zhi-Xin Ye  Friday, January 19, 2007 5:24 AM
Thanks Ye!
EZ1976  Friday, January 19, 2007 7:07 PM

You can use google to search for other answers

Custom Search

More Threads

• Best approach for loading Real time data into datagridview
• Bound DataGridView requires tabbing out of a cell
• Save the dataGridView
• TextAndImageCell - Image click event
• How to change previous DataGrid selected item back color
• update a single cell of datagrid without refresh whole dg
• Not Visible Textbox and Binding Manager Base
• add multiple headers in DataGridView
• Typed DataSet with Oracle
• DataGridView leak due to UserPreferenceChangedEventHandler