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 |
rajnidas
Yak Posting Veteran
97 Posts |
Posted - 2014-09-23 : 08:56:49
|
hi allwhen i execute folowing query select t.FileTypeId from (select distinct FileTypeId from UploadFile_Master where FileTypeId in (select id from File_Master where id between 16 and 21) AND Upload_Date='2014-09-01' AND IsActive=0)tgetting result------------------FileTypeId --------------161718192021need result--------------------if FileTypeId is 20 and 21 is missing then result should be only20 and 21 should come . pls need helpthanks & regardsrajnidas |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2014-09-23 : 09:23:05
|
quote: if FileTypeId is 20 and 21 is missing then result should be only20 and 21 should come . pls need help
I am not able to understand what you are saying here. Can you rephrase it and/or show some examples? |
|
|
Nevarda
Starting Member
5 Posts |
Posted - 2014-09-23 : 10:32:29
|
If I understand your query correctly, when it selects the ID from the File_Master in the last sub-query and returns a result that includes 21, that immediately tells me that 21 is not missing and hence your query works. if 20 did not exist, it would not be included in the result set. Or am I maybe missing some information? |
|
|
|
|
|