Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7912847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:42:19+00:00 2026-06-03T13:42:19+00:00

Following is my Oracle select query for the result, but I’m getting duplicates which

  • 0

Following is my Oracle select query for the result, but I’m getting duplicates which I don`t need. I think it’s hard to find for others,please give it a try.

SELECT I.EID                         EID,
       I.WT                          Title,
       I.RID                         RID,
       I.FORMNAME                    STAGENAME,
       I.FORMS                       STATUS,
       I.INPT                        Projects,
       To_char(I.DVDD, 'DD/MM/YYYY') DVDD,
       CASE
         WHEN B.SID = 2
              AND B.DID = 2 THEN Trunc(F.EVENTDATE) - I.DVDD
         ELSE NULL
       END                           DEVLAPSEDAYS,
       To_char(I.MDD, 'DD/MM/YYYY')  MDD,
       CASE
         WHEN B.SID = 2
              AND B.DID = 2 THEN Trunc(F.EVENTDATE) - I.MDD
         ELSE NULL
       END                           MONITORLAPSEDAYS,
       L.LDEID                       LEADEID
FROM   table1 I,
       table2 F,
       table3 B,
       table4 L
WHERE  I.ACTIVEFLG = 1
       AND I.LATESTFLG = 1
       AND I.FORMSTATUS IN ( 1, 3 )
       AND I.UNIQUEID = F.UNIQUEID
       AND B.SID = 2
       AND B.DID IN ( 2, 3 )
       AND ( F.EVENTDATE > I.DVDD
              OR F.EVENTDATE > I.MDD )
       AND ( ( Trunc(F.EVENTDATE) - I.DVDD ) > 2
              OR ( Trunc(F.EVENTDATE) - I.MDD ) > 2 )
       AND F.LINKID = B.LINKID
       AND I.FORMSTAGENAME IN ( 'Develop', 'Monitor' ) 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:42:21+00:00Added an answer on June 3, 2026 at 1:42 pm

    the best I do with this kind of information is to tell you to group your entire query:

       GROUP BY I.EID,I.WT,I.RID,I.FORMNAME,I.FORMS,I.INPT,
       To_char(I.DVDD, 'DD/MM/YYYY') DVDD,
       CASE
         WHEN B.SID = 2
              AND B.DID = 2 THEN Trunc(F.EVENTDATE) - I.DVDD
         ELSE NULL
       END,
       To_char(I.MDD, 'DD/MM/YYYY')  MDD,
       CASE
         WHEN B.SID = 2
              AND B.DID = 2 THEN Trunc(F.EVENTDATE) - I.MDD
         ELSE NULL
       END,
       L.LDEID
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a following oracle query: SELECT a.USER_ID, c.first_name, c.last_name, TO_CHAR( b.logon_date, 'MM/DD/YYYY HH:MI:SS
On Oracle 9i, why does the following produce the result 'abc' select 'abc '
The following query works on Oracle 10.2.0.1.0 on windows,but doesn't work on Oracle 10.2.0.2.0
Following oracle query complies and works fine: SELECT Employee.EmployeeId, Employee.EmployeeName, Employee.Description, Employee.IsFrozen FROM employee,
I have the following Oracle query SELECT * FROM table WHERE date_opened BETWEEN ((TO_DATE('2011-08-01',
When I run the following SQL query in my Oracle database: SELECT p.pkt_nazwa, u.us_nazwa
I have the following query which runs perfectly well on both Oracle and SQL
I'd need advice on following situation with Oracle/PostgreSQL: I have a db table with
I entered the following SQL commands in Oracle but it complained ORA-00922: missing or
I'm having trouble getting the correct query (oracle) for what I'm looking for. Essentially

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.