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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:48:01+00:00 2026-05-24T20:48:01+00:00

I have two table i want to add one condition while using LEFT OUTER

  • 0

I have two table i want to add one condition while using LEFT OUTER JOIN

select tt.description,tt.visible,vct.currvalue 
from tblemployee tt 
left outer join viwcurrentemployee vct on vct.transitiontype = tt.cid
                                      and vct.employee = 63 
                                      and tt.visible = 1 
order by tt.cid

i want only those record which is have visible = 1 that is true but query ignore the condition and one thing i must have to use left outer join coz i want record from left table even record not present in right table how to check the condition that i will get only those record from left table in which visible is 1

  • 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-24T20:48:02+00:00Added an answer on May 24, 2026 at 8:48 pm

    Try this

    select tt.description,
           tt.visible,
           vct.currvalue 
    from tblemployee tt 
      left outer join viwcurrentemployee vct 
        on vct.transitiontype = tt.cid and 
           vct.employee = 63
    where tt.visible = 1 
    order by tt.cid
    

    I moved tt.visible = 1 to the where clause instead. vct.employee = 63 need to stay in the join because otherwise you would not have an outer join.

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

Sidebar

Related Questions

I have two tables which I want to join together using a left outer
I have two table emptable1(empid,status) emptable2(empid,week) i want to select all the empid whose
I want to place a table on my page. I have two tables in
Say I have two tables I want to join. Categories: id name ---------- 1
I have two links & I want to show / hide them one at
I have two tables in my Database.This can increase later on.I want to add
I have two tables that I'm querying from. In one table, there are fields
I have two tables I want to join. I want all of the categories
i have two tables mapped by JPA with One to Many relationship. I want
Given a table with columns A,B,D,E,F. I have two queries: one that orders by

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.