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 |
|
rdl
Starting Member
25 Posts |
Posted - 2011-05-18 : 20:26:57
|
| Hi,I am doing the following query: Select Z.* FROM ( Select * FROM personalert A WHERE A.PRelation = 'Missing' AND NOT EXISTS( SELECT * FROM personalert B WHERE B.ID = A.ID AND B.PRelation = 'Found' AND B.PDate > A.PDate ) ) Z INNER JOIN person C on Z.ID = C.ID";Query is working in showing the first part till the B.Pdate > A.Date...however it is not showing the fields names from the person table.. I just need the person.Surname and person.Name which is connected by fieldname ID in personalert table...can someone tell me wher I'm wrong please...Thanks a lot for your precious help |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
rdl
Starting Member
25 Posts |
Posted - 2011-05-18 : 20:34:19
|
| The other query in my previous thread worked ok...but this one....can't show the name and suranme from the person table!! |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-05-18 : 20:39:54
|
See the Hint in X002548 thread. KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|