Empty Strings, Nulls, and MS SQL

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.

Councilman Husch’s poposal to confiscate bikes in Herndon

In response to Councilman Husch’s proposal to confiscate all bicycles that are chained, tied to trees or road sign posts in the public right-of-ways, I decided to take a trip out to Historic Herndon and see who would be affected by his proposal.

I saw a lot of bikers, most of them were using the trail to travel through Herndon. Other were stopping to buy drinks or ice cream. Two bikes were locked outside Jimmy’s Tavern. Another outside the bread shop.

What I didn’t find were any people who would fit the profile of an illegal, instead I found mostly white Americans.

As a biked a little further along the trail I spotted this couple locking up their bikes to a street sign next to an open house.

The couple had biked to Herndon and were looking to buy a town house in Herndon specifically because it was close to the trail. They chose to lock up their bike to the street sign at Branch Drive because it was close to their destination and was a solid secure object.

If Councilman Husch’s proposal becomes law, I wonder what their reaction would have been to coming back to find their bikes had been confiscated?

Councilman Husch said that a Virginia Law already prohibits bicycles from being chained to signposts or left in the public right of way. I searched the Virginia law and didn’t find anything that would appear to give them the authority to confiscate bikes parked in the public right of way. So I would ask Mr Husch to let us know the section of the code he is referring to so we can review it.

More on Herndon wanting to confiscate bikes

The Washington Post has picked up on a memo from Dennis D. Husch on his proposal to confiscate bikes in Herndon.

Town officials want to step up police activity and zoning enforcement where the workers gather, ban carryout alcoholic beverage sales downtown and remove the pay phones that the workers use to call their home countries. They want to institute a permitting process for homeowners to rent out rooms, in hopes of reducing the number of workers living in crowded conditions. They also want to confiscate bicycles — a common mode of transport for the workers — that are parked illegally in public places. Dennis D. Husch

I wrote an email to Mr Husch, which he hasn’t taken the time to reply to yet. I did get an email from Connie Hutchinson the Vice Mayor of Herndon saying the Council, as a whole, has not discussed Councilman Husch’s proposal yet and she is against the proposal of confiscating bikes in the public right of way.

I also had a lengthy emails conversation with Bill Tirrell who is on the Herndon Council. Although he has been supportive of installation of the traffic signal at W&OD and Elden and agrees that we need more bike racks in Herndon, he is siding with Mr Husch and feels that confiscating bikes in the public right of way is an appropriate response to illegal residents in the Town of Herndon even though it will also be targeting legal residents.

Town of Herndon’s Dennis Husch proposes conficating locked bikes

Faab, set out an email alert on a story in the Fairfax Times which talks about Dennis Husch’s proposal to confiscate all bicycles that are chained or tied to trees or sign posts in public rights-of-way. I sent an email to the Mr. Husch and the Town of Herndon Mayor and Council.

Dear Mr. Husch

I am a home owner in the town of Herndon and I bike over 100 miles a week.

I was alerted to an article in fairfaxtimes.com by Fairfax Advocates for Better Bicycling which talks about your short sighted comments on confiscating bikes locked up in the Town of Herndon.

Bicycling is a critical component to making a livable community. With gas prices hovering around $4, bikes are a truly viable alternative to cars for short trips under two miles for almost everyone. We need to be putting in more bike racks, improving Bike facilities on roads, and encouraging more biking not making a Herndon a biking no go Black Zone that confiscates bikes.

Bikes are not just used by illegals, they are used by low income families, through high incoming families as a vital transportation link. Many people use bikes for commuting to there jobs and are forced to lock their bikes to a tree or sign post because there are no secure alternatives. I challenge you to walk on the W&OD trail and you will see huge diversity of people using bikes, not just illegals.

I regularly bike in Herndon and lock my bike to a bike rack or to any solid secure object if a bike rack is not available. In fact parking meters and parking signs are my favorite if a bike rack is not available.

By proposing

“establishing a town policy to confiscate all bicycles that are chained or tied to trees or sign posts in public rights-of-way; and removing pay phones along a section of Elden Street and other areas.”

You are directly targeting my bike, a legal, tax paying town of Herndon Resident.

The Town of Herndon should be doing everything in it’s power to encourage biking within the town limits. We need to be introducing legislation that mandates good quality reverse U style bike racks at ever business. If they are mandated to put in a certain number of car parking spaces then they should be mandated to put in a certain number of bike racks. Arlington County which is highly rated as a livable community has a website at https://www.bikearlington.com/ and have published some excellent guidelines on which bikes parking that I suggest you review at https://www.bikearlington.com/parking.cfm

If you have any questions about bike related issues in the Town of Herndon area please feel free to contact me. I regularly attend the Fairfax Advocates for Better Bicycling meetings and I am a Washington Area Bicycle Association member, and I have been biking and commuting by bike for over 25 years.

We will see what kind of response I get.

Update:

Here is a link to the FAAB blog post, it has an interesting comment from the user CouncilmanHusch. I think we have a challenge, document every location in Herndon that needs a bike rack and see if he lives up to his promise. My wife’s response is that the Walgreens at 603 Elden St. Herndon, VA 20170 needs a bike rack. She had to lock her bike to the no parking sign at that location.

Sometimes you got to hate linux

The boot drive on my file server has been really slow, hdparm was returning some really low numbers and CPU was spiking, which i wasn’t expecting on my new hardware. I decided this morning to do some google searches.

Here is the original hdparm results

sudo hdparm -t /dev/sdf
/dev/sdf:
Timing buffered disk reads: 4 MB in 3.56 seconds = 1.12 MB/sec

Then i added the following in /etc/modprobe.d/blacklist

blacklist ata_generic

and in /etc/initramfs-tools/modules added

pata_atiixp
blacklist ata_generic

rebuilt the initramfs

sudo update-initramfs -u -v

rebooted and now I get

sudo hdparm -t /dev/sdf
/dev/sdf:
Timing buffered disk reads: 220 MB in 3.02 seconds = 72.83 MB/sec