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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:15:30+00:00 2026-06-15T22:15:30+00:00

I have a db schema and I am quite not so familiar with T-SQL,

  • 0

I have a db schema and I am quite not so familiar with T-SQL, I know, ORM’s ruined me. Developers 🙂

This is the schema.

Table1 1 – 1 to three tables (Table2, Table3, Table4) and each Table(2,3,4) 1 – 1 to a Table5.

Graph (try) representation:

Table1  1<->1 Table2 1<->1 Table5
        1<->1 Table3 1<->1 Table5
        1<->1 Table4 1<->1 Table5

I need a query to retrieve all Table1 records and their corresponding relationship data, Table1,Table2,Table3 and their relationship data to Table5.

Any help appreciated.
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-15T22:15:32+00:00Added an answer on June 15, 2026 at 10:15 pm

    What I actually needed was this:

    SELECT F.*, DE.Title as EnergyDrinkTitle, DE.[Picture] AS EnergyPicture, DI.Title AS InspDrinkTitle, DR.Title AS RelaxDrinkTitle 
    FROM
    (Select M.*, E.DescriptionTitle, I.[DescriptionTitle], R.DescriptionTitle, 
    E.[DrinkId] as EnergyDrink, I.DrinkId as InspDrink, R.[DrinkId] as RelaxDrink
    FROM  [Member] M
    LEFT JOIN [Energy] E
        ON M.[_id] = E.[MemberId]
    LEFT JOIN [Inspiration] I
        ON M.[_id] = I.[MemberId]
    LEFT JOIN [Relax] R
        ON M.[_id] = R.[MemberId]
    ) AS F JOIN Drink DE ON F.EnergyDrink = DE._id
    JOIN Drink DI ON F.InspDrink = DI._id
    JOIN Drink DR ON F.RelaxDrink = DR._id
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table which have schema like this id name 1 jack 2
I know that I should have schema of a table before calling NewRow method
i have this schema: <div id=container> <div id=content>some text</div> <footer> my footer things </footer>
I have a schema design that looks like this: Table: User Row Column Family
I have a schema like this <h1> 5/2009 <br/> Question: This is the question
I have this schema: <xs:complexType name=foo> <xs:sequence> <xs:element name=oneBar type=xs:string minOccurs=0/> <xs:element name=twoBar type=xs:string
I have this schema which I need to match 2 rows from user_data :
I have been reading ASN.1 specification, but I am not quite sure what exactly
I hope this isn't too specific. I have created an XML Schema which i
I have found some useful info on this issue but can't quite wrap my

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.