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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:43:24+00:00 2026-06-16T01:43:24+00:00

I have 2 Tables like below workitem workId WorkName Status 1 xyz 16 2

  • 0

I have 2 Tables like below

workitem

workId WorkName Status
1      xyz      16
2      abc      16
3      mnc      16

WorkItemTrack
TrackID  workId   Status
1        1        3
2        1        5
3        1        9
4        2        5
5        2        9
6        3        3 
7        3        9

For each “workId” in the WorkItemTrack table the staus should set to 3,5 & 9. in the above case for the workId 2 & 3 the “status” 3 & 5 are missing respectively.

In the above WorkItemTrack Table for the “workId” 2 & 3 the Status 3 & 5 are missing respectively. How to find these 2 records in the above case

  • 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-16T01:43:26+00:00Added an answer on June 16, 2026 at 1:43 am

    This ought to do it.

    Select * FROM WorkItem 
    WHERE WorkID Not in 
    (
      SELECT Distinct WIT.WorkID 
      FROM WorkItemTrack WIT
           JOIN WorkItemTrack WIT1 ON (WIT.WorkID = WIT1.WorkID) AND (WIT1.Status=5)
           JOIN WorkItemTrack WIT2 ON (WIT.WorkID = WIT2.WorkID) AND (WIT1.Status=9)
      WHERE WIT.Status=3
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have four tables like below in sql server 2008 : TABLE 1 ->
I have several tables which looks like these below: <table id=table1> <tr> <th>Item</th> <th>Price</th>
I have tables which looks like below. Employee table Date Employee ID Employer ID
I have three tables kinda like the example below: TABLE CARS carId carName -----
I have a db with two tables like these below, page table pg_id title
I have to related tables like in the example script below: -- Creating table
I have 4 tables like shown below Table: leave_request +------------+----------+--------------+------------+----------------------+ | request_id | staff_id
I have two tables with like below codes: Table: Accounts id | username |
I have a SP with 20 select queries. Each query is table-name-aliased like below.
I have a employee, product and product odometer tables which looks like below Each

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.