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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:23:59+00:00 2026-06-15T21:23:59+00:00

I am trying to develope a db with Sql Server Management Studio. Grandparent table

  • 0

I am trying to develope a db with Sql Server Management Studio.

Grandparent table
Resource
ResourceID_PK   int
Project     nvarchar(5)
Model       nvarchr(15)

Parent table
Machine
MachineID_PK    int
Model_UK        nvarchar(15)
Type
Brand
EmptyWeight

Child tables
DumpTruck   .       Excavator       Loader
DumpTruckID_PK      ExcavatorID_PK  Loader_ID       int
Model_UK            Model_UK        Model_UK        nvarchar(15)
Capacity            Capacity        Capacity

Model column is unique for whole db. I need to reach Capacity column from Grandparent table. Model column of each Child tables are unique since all machinery will have different Model like “CAT966”.

I need to use Grandparent Model column to read one of the Child table, which has the same Model.

I develope a c# project which inputs Model of the machine and will return capacity from the corresponding child 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-06-15T21:24:00+00:00Added an answer on June 15, 2026 at 9:24 pm

    To join the tables, you will need ResourceID_PK in the Parent table and MachineID_PK in the Child tables. Then you can join the tables and reach the Capacity column from the Grandparent table.

    EDIT

    1. Add ResourceID_PK to Machine (the Parent table)
    2. Add MachineID_PK to the Child tables

    To get the Capacity based on Model, use this query:

    Select Capacity
    From DumpTruck c
    Join Machine p on c.DumpTruckID_PK=p.MachineID_pk
    Join Resource gp on gp.ResourceID_PK=p.ResourceID_PK
    where gp.Model='X'
    

    (A small warning, I have not tested this query.)

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

Sidebar

Related Questions

using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studio.2008.R2; What I'm ultimately trying to do is update a sql
using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studio.2008.R2; using Northwind; N00b here, Trying to customize a asp.net gridview
I'm trying to create a persistent SQL (SQL Server 2005) lock on a table
In SQL Server Management Studio, if I attempt to restore a database from a
I'm using Visual Web Developer 2010 Express and SQL Server 2008 R2 Management Studio
I'm trying to develop a model object to hold a Sql Server row, and
using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studios.R2.Express; What I'm trying to do, is get a button to
I am trying to get data from my sql server data table to a
I have the SQL Server 2005 Developer Edition DVD. I have been trying to
I am using SQL Server 2008 developer edition. I was trying to attach the

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.