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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:28:55+00:00 2026-05-23T18:28:55+00:00

Technologies: VS.net 2008, C#, Winforms, SQL Server 2008 So, I kind of screwed up

  • 0

Technologies: VS.net 2008, C#, Winforms, SQL Server 2008

So, I kind of screwed up at work and I apparently just promised to provide a visual query builder to the client with only 1 week left in the project. (I’m new to dealing with clients)

Either way, I’m trying to figure out the logic behind doing SELECT statement joins. (The query builder only has to do SELECT queries)

it’s easy enough to get the DBs table and column lists, and how to create “WHERE”, “AND” and “OR” parts, but I’m not sure how I should think about writing joins.

I have to develop it, because using an outside app, or .dll would require getting approval which could take over a year (Not an Option)

Is there a hard and fast rule that’s says “When writing a select statement, you use the table that has the most results as your “FROM” table, etc..)

I noticed MS Access mostly does Left Joins, but I don’t understand why.

EDIT: I’m no longer required to create it by the end of this week as the project is being delayed to architectural issues, however, I will be asking this question again in the hopes to get an answer to the “Logic” behind join statements

  • 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-23T18:28:56+00:00Added an answer on May 23, 2026 at 6:28 pm

    The real ‘logic’ behind SQL joins gets into relational algebra (I think Wikipedia has a nice high level overview – http://en.wikipedia.org/wiki/Relational_algebra). It’s a big topic, entire classes/books are devoted to it.

    But I’m still a little confused by your question. If you are writing a visual query builder – you shouldn’t care about the logic behind joins. You can assume the relational database you are using will correctly handle that logic and return you the results. The only time you’d need to implement the actual logic for joining is if you were writing your own database.

    If you are writing your own visual query builder you really just need a way for the user to indicate what type of join they want and to build valid SQL from it. Most tools I’ve seen use Left Outer Joins (like you mention Access does) because, inevitably, clients/customers/users will have bad or missing data. When you do an inner join they say, ‘Your tool doesn’t work, I should have 250 rows but I only got 232’. When you do an outer join they say, ‘I have 250 rows but some of them are missing data….I’d better fix that’. Left join seems more natural for most people (at least, I’m guessing, in places where people read Left to Right).

    If you want your query builder to support everything that is possible in SQL – you’ve got a huge, huge, huge project….and like others have said – you are screwed. But the application I worked on had that, and people didn’t like it. They wanted a super-easy, limited, way of building queries. That can be pretty easy. I think you’ve got a great shot at putting together something along those lines. The ‘easy’ query building tool I put together used eight pre-defined queries and allowed the user to provide criteria at runtime. They couldn’t add tables, they couldn’t change the join types, they couldn’t do unions or aggregates or anything else. But they use that more than the full-feature ‘advanced’ commercial tool we purchased.

    I hope that helps a little. Good luck!

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

Sidebar

Related Questions

Using Sql Server 2008, .Net 3.5 & C#. I am designing a desktop application
Technologies: Visual Studio .NET 2008 I'm wondering if anyone is aware of a way
I am using these technologies: SQL Server 2005, ASP.NET MVC, NHibernate/sharp architecture and would
I'm implementing a email newsletter sender service using .NET and Windows Server technologies. Are
Our product currently spans a large number of technologies, including Java, PL/SQL, VB.Net and
I am wrapping up an application using ASP.NET in Visual Studio 2008. I am
Technologies: .net 3.5, Visual Studio 2010, Report Viewer Control version 10, c# I am
We're testing the native Visual Studio reporting technologies for ASP.NET (RDLC file + ReportViewer)
I am writing an MMO Server using the following technologies and languages: .Net Framework
Technologies involved : ASP.NET Web-forms Javascript (jQuery for instance) Case To make it clearer

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.