Archive for April, 2009

Issue with NULL behaviour in CHARINDEX?

April 23, 2009

select LEFT(null,CHARINDEX(‘.’,NULL))

You would expect it to work and return NULL right?
I’ve seen it not working on some servers. These servers are mostly 64 bits (meaning it’s easier to reproduce it on 64 bits) but it gets reproduced on 32 sometimes. You might even encounter the situation where it will work for an indefinte runs and all of a sudden crash.

I have posted it on some sql server forums but nobody can give a valid explanation. And going to Microsoft with it is not always easy 🙂

Advertisements

Kind of busy lately

April 1, 2009

Last two weeks were very busy. Our company released a new version of the software and the deadline was really tight. Managers are nervous, programmers are overwhelmed, everybody wants to get the job done in time which is not always possible. The risk to break something when fixing another thing is high; also I do not like last-minute fixes. But all is well when it ends well 🙂

Besides that I had to work on a arbitrary precision implementation for our calculation module. I guess we were the only calculation engine in the world where 1/3*3 is not 1 🙂
I had to go with different approaches like IntX, BigNum, fraction implementations. All fixed the problem, but were not acceptable performance wise. So decision is still pending.