Solved

SSRS Highlight Dulpicates

Posted on 2010-08-31
3
1,273 Views
Last Modified: 2012-05-10
I need to show or highlight duplicate telephone numbers in my report.

I've tried doing i tin the sql script but the results are ot correct.
0
Comment
Question by:aneilg
3 Comments
 
LVL 10

Accepted Solution

by:
itcouple earned 250 total points
ID: 33568418
Hi

Identifying them in your dataset might be the easiest option. IsDuplicate (true/false). What was the issue with your SQL?

You can usually do self-join for this kind of tasks. This works fine based on Microsoft Adventure works database... a lot of duplicated phone numbers in their db :)
SELECT     C1.CustomerKey, C1.Phone, CASE COUNT(C2.Phone) WHEN 1 THEN 0 ELSE 1 END AS IsDuplicated
FROM         DimCustomer AS C1 INNER JOIN
                      DimCustomer AS C2 ON C1.Phone = C2.Phone
GROUP BY C1.CustomerKey, C1.Phone

Let me know if that helps in your case

Regards
Emil
0
 
LVL 9

Assisted Solution

by:sureshbabukrish
sureshbabukrish earned 250 total points
ID: 33574942
if the dataset is sorted by telephone numbers in the report,you can use [previous] function in expression to determine whether the phone number is a duplicate of the previous one and then you can highlight it.

if it is not sorted, then you need to create a function which accepts the phone number as a parameter and tells you whether it is duplicated or not. you can use the function in your select query
0
 

Author Comment

by:aneilg
ID: 33580736
Thanks for your help guys.

I've had a look at both solutions and they are both good.

0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SSRS Reports - get rid of blank columns 3 73
SSRS set Parameter value 2 84
SSRS 2008 Multi Value Parameter Filter using OR 3 48
SSRS 2016 Rendering HTML tables 3 31
Hi, I have heard from my friends that it’s not possible to create Label Printing report using SSRS. I am amazed after hearing this words not possible in SSRS. I googled lot and found that it is possible to some of people know about the Report Bui…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question