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

  • SEARCH
  • Home
  • 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 8158601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:39:30+00:00 2026-06-06T17:39:30+00:00

I`m working on some sql queries to get some data out of a table;

  • 0

I`m working on some sql queries to get some data out of a table; I have made 2 queries for the
same data but both give another result. The 2 queries are:

SELECT Samples.Sample,
       data_overview.Sample_Name,
       data_overview.Sample_Group,
       data_overview.NorTum,
       data_overview.Sample_Plate,
       data_overview.Sentrix_ID,
       data_overview.Sentrix_Position,
       data_overview.HybNR,
       data_overview.Pool_ID
FROM tissue INNER JOIN (
                            ( patient INNER JOIN data_overview
                                ON patient.Sample = data_overview.Sample)
                        INNER JOIN Samples ON
                          (data_overview.Sample_id = Samples.Sample_id) AND
                          (patient.Sample = Samples.Sample)
                        ) ON
                        (tissue.Sample_Name = data_overview.Sample_Name)  AND 
                        (tissue.Sample_Name = patient.Sample_Name)
     WHERE data_overview.Sentrix_ID= 1416198
          OR data_overview.Pool_ID='GS0005701-OPA'
          OR data_overview.Pool_ID='GS0005702-OPA'
          OR data_overview.Pool_ID='GS0005703-OPA'
          OR data_overview.Pool_ID='GS0005704-OPA'
          OR data_overview.Sentrix_ID= 1280307
     ORDER BY Samples.Sample;")

And the other is

SELECT Samples.Sample,
       data_overview.Sample_Name,
       data_overview.Sample_Group,
       data_overview.NorTum,
       data_overview.Sample_Plate,
       data_overview.Sentrix_ID,
       data_overview.Sentrix_Position,
       data_overview.HybNR,
       data_overview.Pool_ID
FROM tissue INNER JOIN 
                      (
                         (patient INNER JOIN data_overview 
                               ON patient.Sample = data_overview.Sample)
                          INNER JOIN Samples ON
                              (data_overview.Sample_id = Samples.Sample_id)
                              AND (patient.Sample = Samples.Sample)) ON
                              (tissue.Sample_Name = data_overview.Sample_Name)
                          AND (tissue.Sample_Name = patient.Sample_Name)
          WHERE ((
                    (data_overview.Sentrix_ID)=1280307)
                AND (
                     (data_overview.Pool_ID)="GS0005701-OPA"
                     OR (data_overview.Pool_ID)="GS0005702-OPA"
                     OR (data_overview.Pool_ID)="GS0005703-OPA" 
                     OR (data_overview.Pool_ID)="GS0005704-OPA"))
                     OR (((data_overview.Sentrix_ID)=1416198))
ORDER BY data_overview.Sample;

The one in the top is working quite well but it still won’t filter the sentrix_ID.
The second 1 is created with Access but when I try to run this Query in R it gave
a unexpected symbol error. So if anyone knows how to create a query that filter POOL_ID and Sentrix_id with the given parameters thanks in advance

  • 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-06T17:39:31+00:00Added an answer on June 6, 2026 at 5:39 pm

    Is it a case of making the where clause something like this:

     WHERE Sentrix_ID = 1280307 AND (Pool_ID = 'VAL1' OR Pool_ID = 'VAL2' OR Pool_ID = 'VAL3')
    

    i.e. making sure you have brackets around the “OR” components?

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

Sidebar

Related Questions

I'm working to improve the efficiency of some SQL Queries on SQL-Server-2008. There are
I have been using LINQPad to prototype some queries against a SQL 2000 database,
I'm working on a stored proc that executes some dynamic sql. Here's the example
I'm working with an old sql server 2000 database, mixing some of it's information
I'm constructing a SQL query for a business report. I need to have both
I'm terribly bad at keeping MySQL queries straight, but that aside I have one
I have a question about why some SQL (running on SQL Server 2005) is
I'm working on returning a recordset from SQL Server 2008 to do some pagination.
I have a java program that runs a bunch of queries against an sql
I'm working with a program that runs lengthy SQL queries and stores the processed

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.