Stupid Duplicates Die Won’t You

So the other day my former team member call me asking for help. She had inserted the same data into a table three or more times and needed to get rid of them. For those of you with duplications and need to delete them here’s a little statement i came up with and gave her.

DELETE FROM TBL_Employees

WHERE     (EmpID IN

                          (SELECT     MAX(EmpID) AS Expr2

                            FROM          TBL_Employees

                            GROUP BY FirstName

                            HAVING      (COUNT > 1)))

Who owns your hard programming work

Rails Code by davestfu.

 

??????????????????????

to be continued…..

But in the mean while comments and thoughts welcome

10 degrees in 365 days

Each year being in the Jaycees brings something exciting to do and well 2010 is no different. This year in addition to serving on my state’s board and the US Jaycees board I’ve decided to create my own personal challenge for myself. That is to be come a tenth degree Jaycee in the course of the year. The degree program is designed to build great leaders. It starts off at with the basics getting a person socially involved to develop the social and networking skills and then progress over time to the point of where the person is heading up committees, chapter, districts, and states. Most of the things identified in the degrees program I’ve done of the last three years but where I come from we didn’t participate in the degree program and we produce great leaders still.

So here’s how I’m to going to do it so quickly. First working with IL Jaycees ambassador Laura Lee from the Palatine Jaycees I’ll be able to complete my goal. So to start off we will do a full year audit of 2009 of everything I did. Luckily I kept every event I attended last year on my google calendar. After looking through my calendar and marking up everything in order I’m able to advance through my first three degree. Next the goal is to hit all the

For more information about the degree program visit: http://bit.ly/d17g7P

Determing SQL Server Table Size Tip

 

From time to time i run into problems of where some new table appears on m  server and starts eating up all my space. Well i came across this blog posting a while back that does a great job of explaining how to determine the table sizes in a database in SQL 2000 it works in 2005 too.  check it out and let me know what you think.  http://www.mitchelsellers.com/blogs/articletype/articleview/articleid/121/determing-sql-server-table-size.aspx

Date Formatting In SQL

image

I got a request for a report the other day so I built this massive 90 line SQL statement to pull all the data requested. So I sent off a copy of the data report and the guy tells me that he needs the date formatted (YYYYMMDD) instead of (YYYY-MM-DD-HHMMSS) and then he was like is that going to be a problem and I was like ha not really. Give me a moment and I’ll send you a simple. Since I can’t remember the correct expression I did a quick Google search and came across this awesome page http://anubhavg.wordpress.com/2009/06/11/how-to-format-datetime-date-in-sql-server-2005/ covering exactly what I was looking for.