We help IT Professionals succeed at work.
Get Started

display what a record doesn't have from a list

eaweb
eaweb asked
on
212 Views
Last Modified: 2021-04-21
hi,

i have table A and B

table A consist of the following
ID                  name
1                    C
2                    D
3                    E
4                    F
5                    G
6                    H
7                    I
8                    J

and table B consist of
account         ID
67890           1
67890           2
67890           3
67890           6

67822           3
67822           4
67822           6
67822           7

now i need to get wich of the id's in table A the accounts in table B doesn't have.

i want to get someting like:
67890           4
67890           5
67890           7
67890           8

67822           1
67822           2
67822           5
67822           8

i don't kwon if this is possible in query analyzer but, can we make the output like cross data:
example

account      id1      id2       id3      id4      id5      id6       id7      id8
67890           1         1         1                               1        
67822                                 1         1                    1        

Thanks,
Comment
Watch Question
Topic Advisor
CERTIFIED EXPERT
Distinguished Expert 2018
Commented:
This problem has been solved!
Unlock 1 Answer and 9 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE