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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:43:39+00:00 2026-05-12T22:43:39+00:00

I am joining against a view, in a stored procedure to try and return

  • 0

I am joining against a view, in a stored procedure to try and return a record.

In one table I have something like this:

Measurement | MeasurementType | Date Performed

I need to plot TireHeight and TireWidth.

So I am flattening that table into one row.

I only want to return a row though if both TireHeight and TireWidth were measured on that date. I am not using the date performed for anything other than joining TireWidth and TireHeight together. I run a calculation on these 2 numbers for my chart point, and use TireAge for the other axis.

How can I exclude a result row if either TireHeight or TireWidth are not available?

Thanks!

  • 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-12T22:43:39+00:00Added an answer on May 12, 2026 at 10:43 pm

    You’d use an INNER JOIN to only return rows when they are present in both tables. For example:

    SELECT   th.DatePerformed
    ,        th.Measurement as TireHeight
    ,        tw.Measurement as TireWidth
    FROM (
        SELECT DatePerformed, Measurement
        FROM   Measurements
        WHERE  MeasurementType = 'TireHeight'
    ) th
    INNER JOIN (
        SELECT DatePerformed, Measurement
        FROM   Measurements
        WHERE  MeasurementType = 'TireWidth'
    ) tw
    ON tw.DatePerformed = th.DatePerformed
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am joining my address book onto my email table like this: SELECT *
I have a view that is joining two tables and ordering by the first
Is this possible: Joining tables in two databases in one server? 1.1 What connection
I have a couple of tables that are laid out like this: +------------------------------------+ +
I have an SQL SELECT statement joining 2 tables. The main table contains misc
If I have a joining table with two columns, TeamA and TeamB, how can
I had a Linq query against my Entity Framework model that was something like:
When joining to a subset of a table, any reason to prefer one of
i'm joining tables like: select * from tableA a full join tableB b on
I have a relatively simple query joining two tables. The Where criteria can be

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.