Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
muhamet.fetaj
Starting Member
1 Post |
Posted - 2008-02-05 : 04:59:10
|
| Hi!I am beginner on using SQL.How can I select the repeated rows (five or more times) on a table which have the same ID's but different updated date. I do not need to group all the rows with the same ID,s but rows which are repeated many times according to the required reports needed.Below are some information regarding tables and views:VIEW name= dbo.tblCCInvoicesHCOLUMN ID= ConsumerIDCOLUMN DATE= ReadingDateThank you in advance...meti |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-02-05 : 05:03:11
|
SELECT ConsumerIDFROM dbo.tblCCInvoicesHGROUP BY ConsumerIDHAVING COUNT(DISTINCT ReadingDate) >= 5 E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|