Saturday, 21 April 2012

SQL: Query to find Duplicate Rows in a Table

If you would like to list duplicate rows with the count for a table, the following query would be helpful.

Query: Duplicate Rows

SELECT Column1,Column2,Column3,Count(*)
FROM dbo.TableName
GROUP BY Column1,Column2,Column3
HAVING ( COUNT(*) > 1 )

And there are scenarios where we need to find the combination of Columns in a table occurred only once. In such case the following query could be used.

Query: Unique combination of columns

SELECT Column1,Column2,Column3,Count(*)
FROM dbo.TableName
GROUP BY Column1,Column2,Column3
HAVING ( COUNT(*) = 1 )

Hope it helps.
Source : http://mrsupport.blogspot.in/

Search for a Text in whole Database SQL

Search for a Text in whole Database SQL

Hi,

There was a requirement to search for a text in the whole SQL database. found this Stored procedure very useful. though it is worth sharing...

Resource: http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm


-- SearchAllTables ''
CREATE PROC SearchAllTables
(
@SearchStr nvarchar(100)
)
AS
BEGIN
CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630))
SET NOCOUNT ON
DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110)
SET @TableName = ''
SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''')
WHILE @TableName IS NOT NULL
BEGIN
SET @ColumnName = ''
SET @TableName =
(
SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME))
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
AND QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME) > @TableName
AND OBJECTPROPERTY(
OBJECT_ID(
QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)
), 'IsMSShipped'
) = 0
)
WHILE (@TableName IS NOT NULL) AND (@ColumnName IS NOT NULL)
BEGIN
SET @ColumnName =
(
SELECT MIN(QUOTENAME(COLUMN_NAME))
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = PARSENAME(@TableName, 2)
AND TABLE_NAME = PARSENAME(@TableName, 1)
AND DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar')
AND QUOTENAME(COLUMN_NAME) > @ColumnName
)
IF @ColumnName IS NOT NULL
BEGIN
INSERT INTO #Results
EXEC
(
'SELECT ''' + @TableName + '.' + @ColumnName + ''', LEFT(' + @ColumnName + ', 3630)
FROM ' + @TableName + ' (NOLOCK) ' +
' WHERE ' + @ColumnName + ' LIKE ' + @SearchStr2
)
END
END
END
SELECT ColumnName, ColumnValue FROM #Results
END

Thursday, 19 April 2012

Finding IP address in Yahoo! Mail !!

1. Login to your Yahoo! mail with your username and password.
2. Click on Inbox or whichever folder you have stored your mail.
3. Open the mail.
4. If you do not see the headers above the mail message, your headers are not displayed. To display the headers,
* Click on Options on the top-right corner
* In the Mail Options page, click on General Preferences
* Scroll down to Messages where you have the Headers option
* Make sure that Show all headers on incoming messages is selected
* Click on the Save button
* Go back to the mails and open that mail
5. You should see similar headers like this:
Yahoo! headers : name
Look for Received: from followed by the IP address between square brackets [ ]. Here, it is 202.65.138.109.
That is be the IP address of the sender!
6. Track the IP address of the sender





‎202.65.138.109

BY: SUNIL JOHN MARANDI, SYST. ADMIN, PURNEA
Courtesy : katiharho.blogspot.in & http://sapost.blogspot.in/

How does a wireless mouse work when even it is not connected to any other devices?


How does a wireless mouse work when even it is not connected to any other devices?

In the wireless mouse the information from the mouse to the CPU and back are exchanged through radio signals
A mouse is a very important peripheral device in a computer which is used to move the cursor on the computer screen. It has several other buttons which are used to highlight a part of text, images or other information, to scroll pages, to click and open files, folders etc.


In case of a wired mouse, the information from the mouse to the CPU and back are transmitted through a pair of wires. In case of a wireless mouse, these information are exchanged through radio signals.

To support this arrangement, there is a radio transmitter in the mouse and a corresponding receiver in the computer.

The radio frequency receiver receives the radio frequency signals, decodes them, and then sends these signals directly to the computer as normal. RF receivers usually come as built in components that connect to the mouse input. In some cases a separate card is installed in the computers.

Most wireless mice have integrated receivers that plug into a computer's peripheral input and are very small in size. Wireless mice mainly use radio frequencies at 2.4 gigahertz and at these frequencies a mouse can transfer data at very quick speed. Also there is very little or no interference in a work or home environment.
They also have a good range of the order of 100 feet or so. Another technology that is used in wireless mice is Bluetooth RF technology. It uses 2.4 gigahertz frequencies. Bluetooth also has a decent range, usually about 20- 30 feet.

S.P.S. JAIN
Former Member, Engineering, Railway Board
Indian Railways
Gr Noida, Uttar Pradesh

Courtesy : thehindu dtd 18/04/2012

How to Find the IP Address of the Sender in G mail


How to Find the IPAddress of the Sender in G mail

When you receive an email you receive the messages from the sender attached files etc. We dont even know from which place this mail has sent to us or even the IP address of sender. If we know the ip address we can track the IP address using some websites in the inter net. The email comes with some information’s that can tell where the email has been sent from and possibly who sent it.The below instructions help you to find the IP address of the sender in G mail


To Find IP Address in G mail

  • Log in to your G mail Account with your user name and password

  • Open the email for this you want to find out the senders IP Address

  • While opening the view the headers, Click on the other options in G mail and you get many links select the link Click on Show Original

  • You should get a number of headers in this Look for the name “Received” This Received followed by a host names and IP address in bracket. The IP address is the IP address of the sender

  • Then track the IP address of the sender 

    Courtesy : http://saparavur.blogspot.in/

Wednesday, 18 April 2012

Some Facts about “Google”




In 1997 Google's prototype was named "Backrub".
The name 'Google' was an accident. A spelling mistake made by the original founders who thought they were going for 'Googol'.
Google is a mathematical term 1 followed by one hundred zeroes. The term was called by Milton Sirotta, nephew of American mathematician Edward Kasne.
Google.com - The Domain was registered on 15th september 1997.`
Google started off its first operations in a rented garage.
The first ever review of the Google search engine was done by Danny Sullivan of Search Engine watch on August 4, 1998.
Larry and Sergey needed large amount of disk space to test their Page rank also, but the largest hard disk available at the time were only 4 GB. So they assembled 10 of these drivers together , while he was an Undergrad at Michigan University, Larry had built a Programmable plotter out of LEGO, so its only natural that he used the colourful bricks to create Google's first Computer storage.

The prime reason the Google home page is so bare is due to the fact that the founders didn’t know HTML and just wanted a quick interface. In fact it was noted that the submit button was a long time coming and hitting the RETURN key was the only way to burst Google into life.
Sun Microsystem co-founder Andy Bechtolsheim knew a good thing when he saw it. After talking to Larry and Sergey about Google for 30 minutes, he whipped out his checkbook and wrote a check for $100,000, made out to "Google, Inc." Problem was, Google, Inc. hasn't existed yet!Oh, by the way, the Sun in Sun Microsystem stands for "Stanford University Network."
Due to the sparseness of the homepage, in early user tests they noted people just sitting looking at the screen. After a minute of nothingness, the tester intervened and asked ‘Whats up?’ to which they replied “We are waiting for the rest of it”. To solve that particular problem the Google Copyright message was inserted to act as a crude end of page marker.
One of the biggest leap in search usage came about when Google introduced their much improved spell checker giving birth to the “Did you mean…” feature. This instantly doubled their traffic, but they had some interesting discussions on how best to place that information, as most people simply tuned that out. But they discovered the placement at the bottom of the results was the most effective area.
The infamous “I feel lucky” is nearly never used. However, in trials it was found that removing it would somehow reduce the Google experience. Users wanted it kept. It was a comfort button. I’m Feeling Lucky Costs Google $110 Million a Year.
Gmail was used internally for nearly 2years prior to launch to the public. They discovered there was approximately 6 types of email users, and Gmail has been designed to accommodate these 6.
Google publishes variety of logos commemorating holidays and events. The first one on the books being a self-made “Burning Man” logo by the founders themselves.
Google’s first chef Charlie Ayers, ( hired in 1999 ) quit Google and opened his own restaurant in 2005.
Employees are encouraged to use 20% of their time working on their own projects. Google News, Orkut are both examples of projects that grew from this working model.
Orkut is very popular in Brazil. Orkut was the brainchild of a very intelligent Google engineer who was pretty much given free reign to run with it, without having to go through the normal Google UI procedures, hence the reason it doesn’t look or feel like a Google application. They are looking at improving Orkut to cope with the loads it places on the system.
Google products appear in 117 type of languages, including 5 “fake” languages like Elmer Fudd and Swedish Chef. Spanish, German, French and Japanese are the most used search language besides English.
Google’s first ever April Fool’s joke went online on April 1st, 2000 and was called “MentalPlex” – Google’s ability to read your mind.
The Google logo was never centered (as it appears today). It only appeared centered in March 2001. It was aligned to the left earlier. (And there were a lot more distractions then).
Google’s first employee is Craig Silverstein. Craig is the man behind “exact search” (where you get pages containing the exact search term within quotes.)
In 1999, when Google moved to their Paolo Alto office, there were only 19 employees in the company. Today there are 0ver 24000 Googlers.
Google reckons only 10% of the world’s information is online.
It will take Google 300 years to put the entire world’s information online
According to Google, 20-25% ofborder-alt: solid red .5pt; mso-border-top-alt: solid red .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 5.45in;" valign="top" width="523">
Google receives daily search requests from all over the world, including Antarctica
Google believes up to 20% of the online content changes every month.
Google uses over 300 factors to rank websites which includes PageRank
According to Google, 20-25% of the search queries are unique.
In Google, thousands of computers are involved in processing a single search query.
Google uses over 200 signals for Pagerank.
A lot of Googlers work on automatic translation tools. Google has the largest network of translators in the world.
Google translates billions of HTML web pages into a display format for WAP and i-mode phones and wireless handheld devices.
Google consists of over 450,000 servers, racked up in clusters located in data centers around the world.
Courtesy : http://nfpemavelikaradivision.blogspot.in/ &  http://mrsupport.blogspot.in/

How to avail Mobile Banking services- Useful article from TOI



A mobile phone is no longer a simple device to make calls. It's become the hub for all your activities, from e-mailing and browsing to paying bills and transferring money. Banks may have been the first to dip their feet into this technological pool, but telecom companies have begun to catch up. The RBI's step to remove the 50,000 cap that it had imposed earlier on daily mobile transactions has also provided the much-needed boost to mobile banking.


How does mobile banking work?

Mobile banking allows you to conduct financial transactions on your phone just as you would at a bank branch or through Net banking. Banks are now evolving this facility as they launch innovative products.


For instance, IndusInd Bank's cash-to-mobile service enables customers to transfer money to anybody, including those who do not have a bank account. A bank customer can download the bank's app on his phone and then put in the phone number of the person to whom he wants to send the money, along with the transaction amount. The bank will send a message to the remitter and the beneficiary along with different PINs to each. The remitter will have to message his PIN to the beneficiary, who can then use both PINs and his mobile number to withdraw cash from an IndusInd Bank ATM. The service is free but operator charges will apply. Also, the sender will need a Java-enabled handset.



Airtel Money, on the other hand, can be used on any mobile phone and you can register for it by dialling *404# or at an authorised Airtel Money retailer. There are two types of accounts. The first one is an express account , wherein you can load 10,000 and use this to pay utility bills or for booking rail/flight tickets on travel portals.



The upgraded version is called a power account, which can be loaded up to 50,000. This can be done through Net banking or an Airtel Money retailer. Citibank too has started a mobile banking service through its Citibank Cash-to-Mobile Receivables Solution and is aimed at corporate customers. It enables them to receive funds from retailers or end-customers. The advantage is that the money is transferred instantly through IMPS (Interbank Mobile Payment Service), which reduces the cost of transaction.



What banks plan to do?
Banks have decided to take one step at a time. Currently, they are not pushing hardcore banking services, only presenting mobile banking as an enquiry tool to entice the customers to carry out transactions . For example, SMS alerts for bill payment may tempt you to pay the bill through the phone itself.



Banks are also trying to allay customers' fears of data leakage. Each transaction requires multiple PINs or a one-time password (OTP) to ensure it is secure. There are also plans to launch other services under mobile banking to make it more appealing , such as ING Vysya's plans to include wealth management and loan services . "This will allow a client to use his banking app as a gateway for banking, shopping, stock market information and travel," explains Panda.



How to access the wallet in your phone
To register for mobile banking services, you will need... An account with the concerned bank or telecom company. You should be registered forNet banking in case of a bank. A Java-enabled handset for mobile banking, but an ordinary phone will do for Airtel Money. An active GPRS connection in case of mobile banking so that you can access the Net. To download the mobile banking application.



How to transfer funds
Log in to the bank's app menu and input the mobile phone number or bank account number of the beneficiary. Message the PIN you receive from the bank to the beneficiary who will also receive a secret number. He will have to log in both PINs at the ATM to withdraw the money. If the funds are being transferred to a bank account, it will take about four working days.



Is it popular?
While online banking has picked up pace, mobile banking remains subdued. One reason is that when a new technology comes into the market, it takes time for people to familiarise themselves with it, which is why the growth is slow. "Another reason is that the small screen of a mobile phone hampers the usage for transactions," says Ritesh Saxena, head (personal accounts and direct banking ), IndusInd Bank. Moreover , the generation that is hooked on to its mobile phones rarely indulges in banking activities. "However, since the youth prefer phones to PCs, mobile banking will be the preferred channel in the future," adds Saxena.



Phone technology is another problem area as there are different platforms of mobile banking for different phones. However, the advent of smartphones has definitely spelt good news for the mobile banking segment. Says Sharad Mohan, chief operating officer, global consumer bank, Citibank India: "After the launch of Citi Mobile on smartphones we have witnessed a 30% growth in new users."

Source - Times Of India via http://allcgnews.blogspot.in/