troubleshooting Question

Need view to compare Muliple rows in table 1  to multiple rows in table 2 and give one result

Avatar of btl2008
btl2008 asked on
Microsoft SQL ServerSQL
5 Comments2 Solutions218 ViewsLast Modified:
I have two tables. One table contains records where a unique item (x) may associate with several bits. I have another table which assoicates thost bits with a seperate unique code (x'). For example:

tbl1                 tbl2
a 1                  x  1
a 2                  x  2
a 3                  y 1
a 4                  y 2
a 5                  y 3
b 1
b 2
c 1
c 2
c 3
What I'd like to have is a veiw that tells me x is a b because of its combination and y is a c because of its combination, but niether are a because of the required combination. I haven't been able to figure out how to put the view together and I'm hoping it's just a mental margarita on my part. Any ideas?
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros