I have no experience with MSSQL but it seems they have the LEN function instead. Thoughts on incorporating that as well?