Archive for the ‘Work’ Category

Empty Strings, Nulls, and MS SQL

Wednesday, August 27th, 2008

I have a database that I am exporting data from. Once it is in text format I run the dos sort command, then finally compress it. Everything was going well till I noticed that my dump files had lines that were being split in two

I started looking at the original file and found it contained Ascii character 0 or Null. So my first response was to try isnull(column,’-‘) in the query, but that didn’t work

I checked the lookup tables and found that a join was matching and returning an empty string.

On reading the BCP manual I found this

out copies from the database table or view to a file. If you specify an existing file, the file is overwritten. When extracting data, note that the bcp utility represents an empty string as a null and a null string as an empty string.

So nulls are converted to empty strings and empty strings are converted to nulls? Who thought this was a good idea?

So I changed my sql to be NULLIF(column,”) and now everyone is happy.

Good tips on loosing weight

Wednesday, June 18th, 2008

This is a timely article on loosing weight by biking on hills. Since I am planning on biking more often to work from West Falls Church metro I have been looking for a better solution to hills on the Custis trail close to the rosyln. If you know this tail then you know that it is a series of accents and decent that are more up and down when traveling away from Rosyln. This makes it a fun ride in the morning but a killer on the way back. So if I want to loose weight I should stick to the trail and follow the advice in the article of trying to stay seated on the bike for as long as possible.

The disadvantage of going electronic for you bills and statements

Monday, June 16th, 2008

Today I needed to pull up the last pay slip from my old company. The company in question doesn’t offer the benefit of mailing out payslips, only the ability to view them online. For some dumb reason, like maybe the possibility that you might have to document your pay and contributions to the IRS I figured that i would have access to these records for a reasonable period of time say 2-5 years, but today a few months after leaving the company I get this message…..

Fortunately after my years of dealing with the USCIS I decided to print a copy of my pay slips so I am 99% sure I have the payslip I need at home.

I also noticed a similar thing when I closed a credit card, all of a suddenly you loose access to the online records, the same thing also happened when I closed a bank account.

This whole save the environment go to e-statements and e-bills is just an excuse for the company in question to save on printing and mailing costs. If they really wanted to save the environment they would allow you to access the records for 5 years after closing the account, that way you don’t have to print at your own expense copies of the statements.

So make sure you have copies of all your bank statements, bills, pay slips before you terminate your relationship with a company because you are more than likely going to be loosing access to the online versions of those documents as well.

This make me feel old

Tuesday, June 10th, 2008

Mike Saylor is going to ring the bell on NASQ tomorrow to calibrate it’s 10 year anniversary since it first went public. I can’t believe it has been 10 years since they went public. That means it is 10 1/2 years since since I moved to the US on the basis of a job offer and not knowing much else about living in America. I am now married, on my second house and about to file to have my 2 year temporary status removed from my green card.

Finally got a badge

Monday, March 24th, 2008

Yay, finally got a badge that let me in and out the office, so now I can go poop on my schedule rather than when someone is going to be there to let me back in.

I am officially unemployeed.

Monday, March 3rd, 2008

My last day was today, I have the rest of the week off before starting a new job.

Job

Tuesday, October 16th, 2007

For those who know where I work and have read the news today will know that there has been a reduction in force. I wasn’t one of them but the group and department I work in was affected. Most people seem to be taking it well, and all things considered its not a bad time to be looking for a new job. I wish them all the best and good luck in the future.