Skip to main content
Question

Hello Everyone,I am trying find the duplicate values in one of my field but could not able to write the code for it. I have tried with Count(Distinct) > 1 with Case when statement however I'm not getting the output for it.

  • January 27, 2022
  • 4 replies
  • 5 views

In the below table I am checking for duplicate values in Name column. I need the count of duplicate values for example Name ABC has twice, so the out put should be 2. Could you please help me with it.

 

image OUTPUT:

image

4 replies

Hello,

 

try PU_COUNT(DOMAIN_TABLE(INPUT_TABLE"."Name"),"INPUT_TABLE"."Name").

Let me know it that fulfill your requirements.

 

Best Regards,

Mateusz Dudek


Forum|alt.badge.img+7

Hello,

 

Can you explain me above formula briefly by giving the tables names for particular query

 

Regards,

Dinesh.D.


Hello,

 

I don't know how your table is called. If it's called for example "BKPF", and field is called "Name" the query should look like this: PU_COUNT(DOMAIN_TABLE("BKPF"."Name"),"BKPF"."Name")

 

It was searching through one table (in my case I've done in on activity table) and it return number of duplicates is similar way as your output, so if value was placed twice in the table, the output number was 2.

 

Best Regards,

Mateusz Dudek


Forum|alt.badge.img+7

Hello,

 

Thanks Mateusz Dudek its really helpful.

 

Regards,

Dinesh.D