Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on retrieve first row,third row,fifth row within the SQL Server forums, part of the Databases category; how to retriave first row,third row,fifth row and so on...
|
|||||||
| SQL Server SQL Server is a Database Management System(DBMS) by Microsoft |
![]() |
| LinkBack | Thread Tools | Display Modes |
|
|||
|
Re: retrieve first row,third row,fifth row
For get odd rows :
WITH Table2 AS ( SELECT Col1,Col2, ROW_NUMBER() OVER (ORDER BY Col2 ) AS 'RowNo' FROM Table1 ) SELECT Col1,Col2 FROM Table2 WHERE RowNo % 2 <> 0 ; -----------------OR-------------------- You can also try Select Col1,Col2 from Table1 where (( ROW_NUMBER() OVER (ORDER BY Col2 ) ) % 2 ) <> 0 Key point is ROW_NUMBER() function . |
|
|||
|
Chating Dilog box
hi
I am working on a online teaching website where I need to add a chating option and a white board for drawing purpose by which a teacher can teach to a student. So please guide me how I can Add these two things on my web site? please reply soon......... |
|
|||
|
Re: Chating Dilog box
Please send your questions in proper thread, this thread is only for sql server .
|
|
|||
|
Re: retrieve first row,third row,fifth row
For a temporary soln - : use
select * from (select row_number() row_no, emp_no from employee ) emp where row_no%2<>0; Hope this works |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| retrieve and display | DhanaPriya | SQL | 1 | 08-12-2008 08:56 AM |
| Retrieve last record | pavankumarpk | SQL | 8 | 12-27-2007 05:43 AM |
| how to retrieve value from html tag | manishisarda | LoadRunner | 1 | 09-12-2007 01:34 PM |
| How to retrieve data from SAP | chinna.kk | Data Warehousing | 0 | 09-04-2007 02:38 PM |
| Help me retrieve my password | joel | MY SQL | 1 | 12-19-2006 01:53 AM |