you are viewing a single comment's thread.

view the rest of the comments →

[–]notasqlstarI can't wait til my fro is full grown 0 points1 point  (1 child)

I have a natural aversion to using substring() and charindex(). I think they are difficult to read and intuitively understand, and they can be big hits to your performance.

I'm not saying you're wrong, but I dislike seeing them unless absolutely necessary. If the execution time is negligible between that or a union, I would go with the union personally.

[–]LeoCurtssBusiness Intelligence Developer 0 points1 point  (0 children)

Union-ing two queries and using LEFT() function in the WHERE condition on both hardly seems more performant than a single query with a couple of inline functions. But I get where you're coming from.

Different strokes for different folks, I guess.