Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / November 2004

Tip: Looking for answers? Try searching our database.

Question about SQL joins

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Don - 30 Nov 2004 13:57 GMT
I am trying to use SQL to return data from multiple tables at the same time.  
My first table is keyed on SSN.  This table has an ID field in it.  I will
use this ID to find matching rows in 4 other tables.  If any or all of the 4
tables do not have matching rows I still want to return a row from the
original table and anywhere a match was found.

I am using Visual Studio to create the stored procedure.  From what I have
read the VS default is to create inner joins.  Do I need to use a Left join
to acheive my goal?

Don
Brad Shook - 30 Nov 2004 15:47 GMT
Yes, If you use a left join you will get all the data from the primary table
even if the secondary table do not have related rows.

Brad Shook
> I am trying to use SQL to return data from multiple tables at the same time.
> My first table is keyed on SSN.  This table has an ID field in it.  I will
[quoted text clipped - 7 lines]
>
> Don

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.