Home Forums SQL Server 2008 T-SQL (SS2K8) Invalid length parameter passed to the LEFT or SUBSTRING function. Trying to remove everything after the period RE: Invalid length parameter passed to the LEFT or SUBSTRING function. Trying to remove everything after the period

  • Those specific examples you gave will work fine for that query, however, the problem is that somewhere in your data, you have something that doesn't work.

    You could filter those results out in your where clause (see below), however, I would suggest maybe selecting those results out first, and seeing if they need addressing themselves. This will return your bad rows:
    WHERE CHARINDEX('.', MachineName) = 0

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk