Archive for the ‘ Work ’ Category

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)))

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.

Changing the default My documents

imageI’m one of those weird people who use multiple computers each day to get work things done. When I’m in the office I use my desktop PC and then at home I use my work laptop, prior to last year  accessing my work files on my Desktop from work was nearly impossible. An then everyone got their own personal network share about year. Since then I’ve been saving all my files to my share and accessing them their over our corp. vpn to get to them. Well image each time when I start a new file I had to change my saving location from my documents to my network folder and well, that gets kind of old so I figure why not take it one step further. Why don’t I just change my default my documents location. Well after downing a little search on the Internet I came a article in the MSDN  Here’s a link to it if you want to change your default my documents location too http://tinyurl.com/9ngo7y

Sears 2 go

image Sears has taken another step toward embracing new and innovated ways to communicate with customers anywhere anytime. most recently they have introduced the sears 2 go site. A mobile version of the sears site. It comes in handy when your out shopping and you want to compare a product to one you can buy at the local Sears store.