Archive for the ‘ Google ’ Category

Business As Usual

Today I’ll begin working the US Jaycees Site. My first task is to perform a Full DB backup just incase something goes wrong. This was going well  until I ran into my first problem i was unable to access the db server which is no big deal since i could get into the php admin panel.  It’s been so long since I’ve had to perform a manual backup in MYSQL. But that what they make Google for right? After getting the backup completed and burned to a CD i moved on to updated the directory and posting some new documents. While doing this  I came up with a interesting idea to keep track of my work though out the year. I’m using Google docs and created a form using the form feature to track my work which is pictured below. I really haven’t put much though into changing the site design and layout. I personally like it so lets see what people ask me to do. image

How to find duplicate rows in SQL Server

I ran into this problem the other day at work with duplicate rows while trying to merge data from two separate tables into the same table. I couldn’t remember so I just ran a quick search using Google and came across the solution on a Microsoft knowledge base page.

-------------------------------------------------------
The first step is to identify which rows have duplicate primary key
values:
SELECT col1, col2, count(*)FROM t1GROUP BY col1, col2HAVING count(*) > 1
This will return one row for each set of duplicate PK values
in the table. The last column in this result is the number of
duplicates for the particular PK value.

col1               col2

1                   1                   2

—————————————————————