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 6631795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:35:47+00:00 2026-05-25T22:35:47+00:00

I have a sql query select distinct Process.ReportLogProcessID as [Process.ReportLogProcessID], Process.ProcessTitle as [Process.ProcessTitle], CAST(User0.PrimaryEmail

  • 0

I have a sql query

select  distinct 
Process.ReportLogProcessID as [Process.ReportLogProcessID],
Process.ProcessTitle as [Process.ProcessTitle],
CAST(User0.PrimaryEmail AS nvarchar(max)) as [Process_Contacts.IsPrimaryContact]

  from
ReportProcess as Process inner join
ReportProcessContact as ReportProcessContact0 on
    ((ReportProcessContact0.SessionID = Process.SessionID)) left outer join
[User] as User0 on
    ((ReportProcessContact0.ReferenceID = User0.UserID)) left outer join
[Group] as Group0 on
    ((ReportProcessContact0.ReferenceID = Group0.GroupID and
ReportProcessContact0.ReferenceType = 2))

 order by
[Process.ProcessTitle] asc

and it give below result

enter image description here

if you see it returns two rows with the same ‘Process Title’-‘Testing123’ is there any way I can distinct this in spite of whatever be the ‘Process Contact’.

Is there any way to distinct the result on the base of particular column?

  • 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-05-25T22:35:48+00:00Added an answer on May 25, 2026 at 10:35 pm

    In your query [Process_Contacts.IsPrimaryContact] column have different emails for both records. If you remove that column then only it will distinct records.

    UPDATE : You can try like :

    select  
           Process.ReportLogProcessID as [Process.ReportLogProcessID], 
           Process.ProcessTitle as [Process.ProcessTitle], 
           MAX(CAST(User0.PrimaryEmail AS nvarchar(max))) as [Process_Contacts.IsPrimaryContact] 
    from ReportProcess as Process 
    inner join ReportProcessContact as ReportProcessContact0 on 
          ((ReportProcessContact0.SessionID = Process.SessionID)) 
    left outer join [User] as User0 on 
          ((ReportProcessContact0.ReferenceID = User0.UserID)) 
    left outer join [Group] as Group0 on 
          ((ReportProcessContact0.ReferenceID = Group0.GroupID and 
          ReportProcessContact0.ReferenceType = 2)) 
    
    group by Process.ReportLogProcessID, Process.ProcessTitle
    order by [Process.ProcessTitle] asc 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an oracle sql query select distinct tab1.col1, tab2.col1 from table1 tab1 join
I have this SQL Server query SELECT count(distinct [IP]) as GlobalUniqueIPcount, --RangeUniqueIPcount (SELECT count(distinct
If I have this SQL query: select distinct top 1 'PostId' = isnull(RootPost,Id), PostedDateTimeUtc
I have the following SQL query: SELECT DISTINCT ProductNumber, PageNumber FROM table I am
I have the folowing sql query: SELECT DISTINCT(tbl_products.product_id), tbl_products.product_title, tbl_brands.brand_name, tbl_reviews.review_date_added, NOW() AS time_now
I have this sql query: SELECT DISTINCT url FROM paragraphs WHERE MATCH (title) AGAINST('$query')
I have a nested SQL query : SELECT DISTINCT(topic_id) FROM bb_posts WHERE topic_id NOT
I have a sql-query where I ask for some dates. "SELECT DISTINCT date FROM
I have following sql query for finding 2nd max salary. Select * From Employee
I have to perform the following SQL query: select answer_nbr, count(distinct user_nbr) from tpoll_answer

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.