Posts tagged 'sql'

MSSQL SUBSTRING() and LEN() Gotchas

Autocompletion is not always a good thing if you use something for the fist time and after seeing similar name you think it will behave as in all other languages, but in T-SQL it is not always true. I was creating a dynamic SQL in stored procedure in SQL Azure and assumed that LEN() and SUBSTRING() will work in the way I think they should. I was wrong. My goal was to remove the ", " part after creating optional elements in query....

Read more MSSQL SUBSTRING() and LEN() Gotchas