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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:55:27+00:00 2026-06-14T20:55:27+00:00

In Ms Access, I’m trying to write a SQL query that answers a question

  • 0

In Ms Access, I’m trying to write a SQL query that answers a question like:
Return all player IDs on all teams in a list of football players where at least one member of the team is injured.

I’m new to SQL. I’ve tried something like

SELECT pid FROM players WHERE team_id IN 
           (SELECT team_id FROM players WHERE injury = 'yes') 

Access won’t accept this IN. Is there a simple way to do this? I’d rather run thus as one query, instead of creating separate queries, so I can change it easily as necessary.

  • 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-14T20:55:30+00:00Added an answer on June 14, 2026 at 8:55 pm

    I find it hard to believe that it doesn’t support IN, nevertheless you can do it using a join:

    SELECT distinct players.pid
    FROM players as injured
    INNER JOIN players on players.team_id = injured.team_id
    WHERE injured.injury = 'yes'
    

    I used distinct in case there’s multiple injured players on the one team, which would result in the players from that team being returned multiple times

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

Sidebar

Related Questions

Any Access guru's out there that can help me out? Trying to figure out
Access has something like this where you view all the relationships between the existing
Access HTTP response headers in for flash.net.URLLoader object? I found the above question that
My Access query is returning fields out of order. It was my understanding that
Access 2007 / SQL / VB I have a query: SELECT Count(*) AS CountOfCR1
Access denied for user 'root '@'localhost' (using password: YES) Yes, this error is all
Access modifiers like public , private are not allowed on static constructors in C#.
Which access modifiers which when used with the method makes it available to all
Access 2007 is telling me that my new expression is to complex. It used
I access a REST api service that utilizes a variable called session_id. The API

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.