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

  • Home
  • SEARCH
  • 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 8289043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:25:01+00:00 2026-06-08T12:25:01+00:00

I am trying to learn SQL and wondering if something like this possible. Select

  • 0

I am trying to learn SQL and wondering if something like this possible.

Select * 
from RDInfo RD
right outer join RDCollection RDC 
    on (RDC.RDInfoID = RD.RDInfoID and RDC.IsReceived = 1 
        and RDC.IsRenewed = 0) or -- RDInfoID not in table RDC

I am trying to get data from RDCollection if it satisfies 3 conditions written in the braces if not RDInfoID does not have a record in RDC table. This is in Sql 2005.

I hope i am clear. I am not sure if this is the right away. Thank you very much for the help. Thanks!

So here, All Employees may or may not have a record in Department, so in that case, how can

  • 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-08T12:25:02+00:00Added an answer on June 8, 2026 at 12:25 pm

    Just use a left join instead of a right.

    Select *  
    from RDInfo RD 
    left outer join RDCollection RDC  
    on (RDC.RDInfoID = RD.RDInfoID and RDC.IsReceived = 1 and RDC.IsRenewed = 0)
    

    By using left outer join entries from RDInfo are returned regardless of whether or not there’s a match for RDCollection. When there isn’t a match the columns from RDCollection contain nulls.

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

Sidebar

Related Questions

Hei I’m trying to learn Linq to SQL and wondering if somebody can suggest
I'm trying to learn SQL and for demonstration purposes I would like to create
Trying to learn PL/SQL with multimedia data. Can anyone please point out that from
I found this script on about.com which I'm trying to learn from on how
I found this script on about.com which I'm trying to learn from on how
I am learning SQL and am trying to learn JOINs this week. I have
I'm still trying to learn SQL as of this writing, so I'm a bit
I'm trying to learn how to join multiple columns from one table to a
I'm trying to learn SQL, using PostgreSQL 9.1.3. I would like to understand some
I am trying to learn SQL query optimization using SQL Server 2005. However, I

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.