Count the duplicate values stored in the database
-
Hii All How can i count the dulplicate values stored in the particular column of the table in database, through windows application. For e.g. If incase i want to display no. of books with same title from the title column in the text box. In the window form named multiple books which has a datagrid connected to the book entry database should display only the records which are multiple. And as datagrid row is clicked the information of no. of books available should be displayed in the textbox on same form. Suppose there are five books on Title (Gone with the winds) the datagrid will display the book details in one row as one book. And as user clicks the particular row the textbox1.text should display the no. 5 . Please try to solute Thanks
Nikhil Bandekar Mumbai, India
-
Hii All How can i count the dulplicate values stored in the particular column of the table in database, through windows application. For e.g. If incase i want to display no. of books with same title from the title column in the text box. In the window form named multiple books which has a datagrid connected to the book entry database should display only the records which are multiple. And as datagrid row is clicked the information of no. of books available should be displayed in the textbox on same form. Suppose there are five books on Title (Gone with the winds) the datagrid will display the book details in one row as one book. And as user clicks the particular row the textbox1.text should display the no. 5 . Please try to solute Thanks
Nikhil Bandekar Mumbai, India
hi try to excute this query : SELECT Count(*) AS boos_count, book_title FROM books_table GROUP BY books_table.book_title
Tamimi - Code