Get Count Of Duplicate Records Using A Loop
-
Dear All I have a Table Named CustomerDetails where i have millions of records the table structure is as follows
**RecordId CustomerName CompanyName EmailAddress Phone**
Is it possible to get the EmailAddress count of specific domains like how many emails with @gmail.com, @yahoo.com, @rocketmail.com, @att.net, @verizon.net I have tried a lot of ways but i have failed in all tries , If possible drop me a line of code so it will be a great help for me Kind regards James -
Dear All I have a Table Named CustomerDetails where i have millions of records the table structure is as follows
**RecordId CustomerName CompanyName EmailAddress Phone**
Is it possible to get the EmailAddress count of specific domains like how many emails with @gmail.com, @yahoo.com, @rocketmail.com, @att.net, @verizon.net I have tried a lot of ways but i have failed in all tries , If possible drop me a line of code so it will be a great help for me Kind regards James1. What type of database? 2. If using SQLServer, consider the following: select count(*) from security_data where charindex('Test',Resource_Desc) > 0 The table and column represent my data, but you should be able to modify it to your needs. Tim
-
1. What type of database? 2. If using SQLServer, consider the following: select count(*) from security_data where charindex('Test',Resource_Desc) > 0 The table and column represent my data, but you should be able to modify it to your needs. Tim
Hi tim Thank your for your reply yes am using SQL2000
-
Hi tim Thank your for your reply yes am using SQL2000
You're welcome.
-
You're welcome.
Hi Tim
select count(*) from CustomerDetails where charindex('@',EmailAddress) > 0
Here its showing total record count, i wish to get the count of emails with @gmail.com @yahoo.com, but i cannot hard code this cause the list is so big that it has to run a loop by itself Kind regards James
-
Hi Tim
select count(*) from CustomerDetails where charindex('@',EmailAddress) > 0
Here its showing total record count, i wish to get the count of emails with @gmail.com @yahoo.com, but i cannot hard code this cause the list is so big that it has to run a loop by itself Kind regards James
Using a different table on my end... select distinct substring(email_distribution,charindex('@',email_distribution),len(email_distribution)), count(*) from bow_reports where charindex('@',email_distribution) > 0 group by substring(email_distribution,charindex('@',email_distribution),len(email_distribution)) Again, customize to your use. email_distribution should be equivalent to your emailaddress bow_reports should be equivalent to your customerdetails Tim
-
Using a different table on my end... select distinct substring(email_distribution,charindex('@',email_distribution),len(email_distribution)), count(*) from bow_reports where charindex('@',email_distribution) > 0 group by substring(email_distribution,charindex('@',email_distribution),len(email_distribution)) Again, customize to your use. email_distribution should be equivalent to your emailaddress bow_reports should be equivalent to your customerdetails Tim
Dear Tim Thank you very much it worked :) Kind regards James
-
Dear All I have a Table Named CustomerDetails where i have millions of records the table structure is as follows
**RecordId CustomerName CompanyName EmailAddress Phone**
Is it possible to get the EmailAddress count of specific domains like how many emails with @gmail.com, @yahoo.com, @rocketmail.com, @att.net, @verizon.net I have tried a lot of ways but i have failed in all tries , If possible drop me a line of code so it will be a great help for me Kind regards JamesI would write a user-defined function that returns the domain and then group by it.