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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:26:42+00:00 2026-06-11T23:26:42+00:00

I am new to SQL, so please bear with me. I am working with

  • 0

I am new to SQL, so please bear with me.

I am working with two tables that do not have common fields. I am trying to create simple hierarchy based on the two tables that look like this:

   Table 1. 

Cul 1   Cul 2 
============== 
S10000  Name 
S20000  Name 1 
S30000  Name 2 
S40000  Name 3

 Table 2 

Cul 1   Cul 2  
=====================
A10000  Test 
A10001  Test 123 
A20000  Test 1
A20001  Test 999 
A30000  Test 2  
A30002  Test 5555 
A40000  Test 3   
A40006  Test 84384848

I would like to write a query that will display ‘Name’ field from Table 1 based on matching numeric values in the first columns from table 1 & 2.

So if Table 1 is S10000, display A1000 – Test

Is that possible?

Thank you

  • 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-11T23:26:43+00:00Added an answer on June 11, 2026 at 11:26 pm
    SELECT
       t2.*
    FROM Table1 t1
    INNER JOIN Table2 t2 on SUBSTRING(t1.Cul1,2,LEN(t1.Cul1)-1)=SUBSTRING(t2.Cul1,2,LEN(t2.Cul1)-1)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to sql so please bear with me here. I have two
I'm relatively new SQL queries, and I'm trying to join two tables in order
I'm new to SQL. I have a simple problem with getting the results from
I am new to sql and programming so please bear with me. Is there
I am VERY new to mySQL, please bear with me. I have an array
i am new in sql and i want that , i have a table
I'm quite new to linq, so please bear with me. I'm working on a
I'm pretty new to this so please bear with me. I'm trying to make
I am totally new to SQL . I have a simple select query similar
Today is my first day working with SQL so please bear with me for

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.