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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:09:44+00:00 2026-06-07T20:09:44+00:00

SELECT P.CODE, P.STATUS, G.DESCRIPTION, x.xref_code, X.XREF_STATUS FROM table1.price_data p, TABLE2.GENERAL_DATA G, TABLE3.XREF_DATA X WHERE

  • 0
SELECT      P.CODE,
            P.STATUS,
            G.DESCRIPTION,
            x.xref_code,
            X.XREF_STATUS

FROM        table1.price_data p,
            TABLE2.GENERAL_DATA G,
            TABLE3.XREF_DATA X

WHERE        
        P.CODE = G.CODE
        AND G.CODE=X.CODE
        AND x.code=4545645
        AND X.VEHICLE_CODE=9999999

There are literally 30,000 rows to filter through…how do i alter the above query to show only unique values of x.xref_status?

  • 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-07T20:09:46+00:00Added an answer on June 7, 2026 at 8:09 pm

    It’s not clear why your X.XREF_STATUS duplicates: there are dups in TABLE3 table? Or, more likely, there are many references to XREF_STATUS values in related records?

    If rows differs for other columns than X.XREF_STATUS, you won’t be able to pick one row instead of another to show only unique X.XREF_STATUS values.

    A list of unique X.XREF_STATUS values can be obtained with:

    select distinct X.XREF_STATUS
    from TABLE3.XREF_DATA X
    where x.code=4545645
    AND X.VEHICLE_CODE=9999999
    

    This can be joined to other tables to obtain related data, but again if you join with a table containing more than one reference to X.XREF_STATUS this will dup accordingly.
    You must aggregate other columns (COUNT, SUM, etc.) to avoid dups.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the code I have : $sqlz = SELECT t1.user_id, t2.status, t2.email FROM
INSERT INTO [Tasks] ([LoginName] ,[Type] ,[Filter] ,[Dictionary] ,[Description]) Select N'Anonymous',4,'SomeTable.targetcode in (select Code from
dbStatement = con.createStatement(); dbResult = dbStatement.executeQuery(SELECT Vendor_Code FROM temp ORDER BY status ASC );
I want to ability to select code from my program such as dreamweaver or
Here's my code: select yr,count(*) from movie join casting on casting.movieid=movie.id join actor on
i develop this code: SELECT COUNT(NewEmployee.EmployeeID), NewEmployee.EmployeeId,EmployeeName FROM NewEmployee INNER JOIN NewTimeAttendance ON NewEmployee.EmployeeID
SELECT items.item_id, items.category_id, items.title, items.description, items.quality, items.type, items.status, items.price, items.posted, items.modified, zip_code.state_prefix, zip_code.city, books.isbn13,
SELECT DISTINCT business.name AS businessname ,business.description AS description FROM business , category , sub_categories
mysql> select description from devices where id=172; +--------------------------------------------------------------------------------+ | description | +--------------------------------------------------------------------------------+ | Fault:
The following code: select( select m.Code + ' ' + cast(m.Completed as varchar(max)) +

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.