Here I’m going to show you the query to get all the duplicate records from a table. Below is a sample table Employee which has the duplicate data “Bangalore” in the Location column.
You can use the query mentioned below in order to get the duplicate records.
One of the ways to improve performance is to fetch only the required data from the database. By implementing a pagination technique in the stored procedure, it would help us in getting only the required set of records. This can be made possible by making use of ROW_NUMBER() which was introduced in SQL Server 2005. Below is a sample query which would fetch 10 records for each page.
ROW_NUMBER() requires the ORDER BY clause inorder to determine the sequence in which the rows are assigned their unique ROW_NUMBER within a specified partition. Hence as you see in the above query, I’ve used the “Name” column. By passing the @index value as 0, 10, 20…you can get the pagination effect for your data.
At times we would want to programmatically select a page of a Datapager. As you can see, the code below shows a DataPager dpTest which is linked to the Listview lvTest.
In order to select the desired page programmatically you just need the code below:
Please note that the value 10 in the above code indicates the index of the first record on the page of data and not the page number you want to select.
We are so much dependent on gadgets these days, so much so that even for a simple math our immediate reflex would be to pull out our mobile from our pocket and open the calculator app.
I’m not sure if anyone has already thought of this, but then yesterday I was thinking, instead of wasting time unlocking the screen and searching for the calculator app on your phone, why can’t we just have the calculator app solve both the purpose. To unlock the screen as well as do some quick math.
I’ve managed to create a demo for this using my own HTC phone. As you can see in the video below, I just used the code “12255″ and then immediately pressed “=” to unlock the screen.
Wow! The Next-Gen bulb is here. The Bluetooth Bulb lets you pair your phone with one or more lights in your home, and you can control them via an app. And the best part is, you will be able to control the brightness, the timing of turning the bulb on and off, and with the RGB model only your imagination is the limit of the number of colors you can create.