I'm working with a smallish recordset of just over 2 million records. In order to select the correct information, one of the select statements needs only the 5 leftmost characters.
Currently I'm using LEFT(col3, 5)
Does anyone have any advice as to which of the three methods would be faster, and possibly an explination of why?
Thanks!
Currently I'm using LEFT(col3, 5)
Does anyone have any advice as to which of the three methods would be faster, and possibly an explination of why?
Code:
The three methods...
LEFT(MyColumn, 5)
SUBSTRING(MyColumn, 1, 5)
CAST(MyColumn AS CHAR(5)
Thanks!