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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:09:16+00:00 2026-05-31T19:09:16+00:00

I am stuck with a query in an Sqlite Database. The complete table structure

  • 0

I am stuck with a query in an Sqlite Database.
The complete table structure is a bit complex so I will make an example that is broken down to my Problem.
I have 2 tables like

T1
_id       name      v1        v2        v3
1         test      4         3         1
2         to        1         2         2
3         show      2         2         2
4         what      4         2         4
5         I         1         1         1
6         mean      3         3         1

T2
_id       name
1         this
2         is
3         a
4         test

v1, v2, v3 are the foreign keys of T2 _id and in combination will result in one string.

In this example:

T1 _id 1: testathis
T1 _id 2: thisisis
T1 _id 3: isisis
T1 _id 4: testistest
T1 _id 5: thisthisthis
T1 _id 6: aatest

And in this resulting string I want to search and get a result table.
For example if the search string is “isi” (in the sql query “%isi%”) I want to get a result table like this:

name   v1v2v3
to     thisisis
show   isisis

It is propably quit easy but I am totally stuck here.
I tried already several ways including group_concat() and various combinations of select … where clauses.
Although I tried a query similar to this one.
But I am allways failing on the fact that the string has to be concated from rows of another table.

  • 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-31T19:09:17+00:00Added an answer on May 31, 2026 at 7:09 pm
    SELECT
      T1.name as name,
      tmpV1.name || tmpV2.name || tmpV3.name as v1v2v3
    FROM
      T1
    JOIN
      T2 as tmpV1 on T1.v1 = tmpV1._id 
    JOIN
      T2 as tmpV2 on T1.v2 = tmpV2._id 
    JOIN
      T2 as tmpV3 on T1.v3 = tmpV3._id
    WHERE
      v1v2v3 like '%isi%'
    ;
    

    Edit: aww Mosty beat me.

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

Sidebar

Related Questions

I need to make a webpage (from scratch) that will interrogate a SQLite database
I have a SQLite database in Android with a table that contains longitude, latitude
I am stuck on a query to generate a temporary table having values according
Kind of stuck on a query. I have a table of quiz results which
I'm getting stuck with formatting an LDAP query against my AD. It appears that
I'm stuck one query here. I need see that which products customer X hasn't
I'm stuck on a query with a join. The client's site is running mysql4,
I am stuck figuring out a working SQL Query for the fallowing: I need
I'm stuck with another coordinates related query here. I have a number of CSV
I'm stuck on a MDX query, I'm trying to retrieve the following results: [Time].[2009]

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.