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 |
|
sree432
Starting Member
7 Posts |
Posted - 2004-11-18 : 03:14:15
|
| Table Name : EmpTotals Cols Present : 5EmpId EmpName1 ST2 BL3 SW4 BS5 SRI wanted to select all rows except first two rows(ie , 1 and 2)Out Put Should Be Like ThisEmpId EmpName3 SW4 BS5 SR Thanking You.Sreedhar Reddy |
|
|
Kristen
Test
22859 Posts |
Posted - 2004-11-18 : 03:16:37
|
| SELECT EmpId, EmpNameFROM EmpWHERE EmpId NOT IN (SELECT TOP 2 EmpId FROM Emp ORDER BY EmpId)ORDER BY EmpId Kristen |
 |
|
|
sree432
Starting Member
7 Posts |
Posted - 2004-11-18 : 03:50:54
|
| Thanks you very much kristen.Actually i am trying with NOT EXISTS and no rows are selected. |
 |
|
|
lazerath
Constraint Violating Yak Guru
343 Posts |
Posted - 2004-11-19 : 10:52:16
|
| If any results are returned from the query within NOT EXISTS, the expression will evalute to false and therefore return no results. |
 |
|
|
|
|
|