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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:58:59+00:00 2026-05-25T21:58:59+00:00

My problem is this: Say I hypothetically have a table called fastfood which has

  • 0

My problem is this:

Say I hypothetically have a table called fastfood which has one field called fastfood_chains that have values of “Awesome Wendys” and “Peanut Chuck”

Then I have another table called fastfood_info that has a field “fastfood_chain” but the values aren’t identical to the other table, it’s shortened to “Wendys” or “Chucks”

How would I display all the rows from fastfood_chain and have the results print the full name using the other table instead of just “Wendys” or “Chucks” ?

I assumed it had something to do with the LIKE statement but I’m having difficulties. Any help would be appreciated.

  • 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-25T21:58:59+00:00Added an answer on May 25, 2026 at 9:58 pm

    If You know that fastfood_chain in second table contains only subsets of fastfood_chain from first table. I didn’t quite understand what exact columns do You want in the result, but You can list them with fff and ffc prefix:

    SELECT * FROM fastfood_chains ffc
    INNER JOIN fastfood_info ffi ON 
         ffc.fastfood_chain LIKE CONCAT('%', ffi.fastfood_chain, '%')
    

    Please note that this might be extremely slow depending on many factors.

    P.S.: I don’t have access to MySQL instance at the moment. Hope it works now.
    For MSSQL users, the last line should be:

         ffc.fastfood_chain LIKE '%' + ffi.fastfood_chain + '%'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this problem where after a field (say Field3 in table MyTable) is
Consider this problem: I have a program which should fetch (let's say) 100 records
(This is a hypothetical question for discussion, I have no actual problem). Say that
It seems this problem is quite popular on programming. I have a table that
This is what I want to know. I have a table which has the
i have problem use link_to_remote link_to_remote document example say link_to_remote Delete this post, :update
I'm trying to get my head around this one: Say you have two models
I've had this problem a couple of times. Let's say I want to display
I have been puzzling over a problem this morning with LinqToSQL. I'll try and
I'm running in to the same problem this individual has . Specifically, I'm trying

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.