I am looking for help to write a query.
I have a database with an ID a Date_Field and a Description. I want to find out two things

What Date_Field and Description and Description are the same? {duplicate records}

SELECT *
FROM TIME_TABLE t1
WHERE EXISTS (
  SELECT * FROM TIME_TABLE t2 WHERE t2.DATE_FIELD=t1.DATE_FIELD AND
        t2.DESCRIPTION=t1.DESCRIPTION AND
        t2.RECORD_NUM<>t1.RECORD_NUM
        ORDER BY Date_field
  )

What row has an Identical Date_Field
{ Identical dates}

Select *
from TIME_TABLE t1
where exists (
  select * from TIME_TABLE t2 where t2.DATE_FIELD=t1.DATE_FIELD and
        t2.RECORD_NUM<>t1.RECORD_NUM
  )

Do these two queries look reasonable?
Thanks!

Not of value any more.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.