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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:37:45+00:00 2026-06-09T02:37:45+00:00

I have two tables, ones lists students_playing but it’s about 10 characters long, first

  • 0
  1. I have two tables, ones lists students_playing but it’s about 10 characters long, first and last name combined….
  2. I want to select from the avail_students but I don’t want to select the students that has the same name that matches the first 5 characters.

My select command right now is:

select * from avail_students where lastplayed<now() and name not IN strip(students_playing),5)

I know the last part is not correct but I don’t even know where to start.

Any kind of help I get from this is greatly appreciated. Thank you 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-09T02:37:47+00:00Added an answer on June 9, 2026 at 2:37 am

    I think the LEFT function and nested subqueries are what you are looking for.

    The example below should compare the first 5 characters only.

    SELECT * FROM avail_students 
    WHERE lastplayed < now() 
    AND NOT EXISTS (
        SELECT * FROM students_playing
        WHERE LEFT( students_playing.name, 5 ) = LEFT( avail_students.name, 5 )
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables like the ones below. I need to find what exchangeRate
I have two tables one with ID and NAME table 1 ID | NAME
I have two tables user table user_id | name | 1 | peter |
I have two tables in my database, table1 and table2. They are identical. But
I have two tables, one has about 1500 records and the other has about
I have two tables. Widgets, which has information about each widget (Color, size, etc);
i have two mysql tables. the first is called chosen and consists of id,
I have two tables one Employee and mailing Subscriptions Employee looks like this: Name
I have two tables: events : id, name, date_from, date_to event_recurrences : id, event_id,
I have two tables users - id - name - email users_groups - user_id

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.