ORDER BY

How to use SORT control in SSIS ? TIP #115

Dear Friends, In the series of Learn SSIS step by step this is the 5th post. Now from this post we are going to use each transformation control one by one. So, lets start with simplest one transformation control which is “Sort”. By the name it is clear data it will sort the data which …

First_value & Last_Value according to group set is that easy ? tip #44

  Problem:-  Most of the time we require data in which we require first value and last value from different group of rows. Now how easy we can get result this is one of the challenge for us. Solution:- Lets understand this by an example. Suppose you have a sales table in which you maintain …

Interview Question- How conditionally sort the records ? TIP#43

  Problem:- Can we sort records according to particular condition ? Solution:- Most of the time developer faces this challenge of sorting records conditionally. I know  many of us faces this question in interview. Lets understand this by an example. Suppose I have a person table in database and  I want to sort the records …

Row_Number() function for providing sequence number as per your wish TIP #35

  Sometimes we require sequence column or we can a row number column so we have ROW_NUMBER() function in SQL SERVER. Lets understand this by following example In this example we have  person table which have firstname, last name, middlename  columns. Now we want to fetch records  with a extra column ROW_Number() so we write …

Get different records or random order at each time when you fetch record by newId() TIP#33

Hello friends, Sometimes your project require whenever a page load or user search then each time you need to show a random order or we can say different records or order. To achieve this we can use following command SELECT * FROM yourtableName order by NewID() in below snap I am fetching person table of …