Facebook
Welcome to Techsapphire

ROW NUMBER

Select Alternate Row SQL Server

Their are many approaches to get alternate record from SQL server database table. Here i have discussed 2 approaches1. Complex Query2. Using Views Complex Query: SELECT * from (SELECT ROW_NUMBER() OVER(ORDER BY Employee_id) as RowNumber, * from employees) T where t.RowNumber%2=0 Using Views:CREATE VIEW with_rownumberasSELECT ROW_NUMBER() OVER(ORDER BY Employee_id) as RowNumber,* from employees; SELECT * from […]

SSIS Row Number

Generating Row Number in SSIS for each record.  Steps for Generating Row Numbers are: Step 1: Add Data Flow.