Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
nunov
Starting Member
17 Posts |
Posted - 2010-05-11 : 15:43:08
|
| How do I check if every distinct atributes of one column of one table are in another column of another table?Thank you for the attentionNV |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
nunov
Starting Member
17 Posts |
Posted - 2010-05-11 : 16:15:46
|
| Sorry actually in the problem I'm facing, I have to check if a combination of atributes os two diferent columns in one table exists e another oneI tried to do this, based in what you have answered, but it doesn't workselect * from (select numinq, numperg from perguntatxt) t where not exists (select numinq, numperg from utilresptxt u where t.numinq=u.numinq)the variables are abreviations from portuguese so i'll try to explain the problem:- numinq means number of enquiry and numperg means number of the question.- utilresptxt is a table where I register answers from users- perguntatxt is where the questions are registeredWhat I wanted to do was to check if a user had answered all the questions of an enquiry (by checking if there was any question registered that was not in the table of registered answers)How should I do it?NV |
 |
|
|
nunov
Starting Member
17 Posts |
Posted - 2010-05-11 : 18:20:31
|
| I've done it thank youNV |
 |
|
|
|
|
|