Home Forums SQL Server 2005 Administering Msg 102, Level 15, State 1, Line 1 Incorrect syntax near '-'. RE: Msg 102, Level 15, State 1, Line 1 Incorrect syntax near '-'.

  • Try:

    SELECT _BODY, REPLACE('from a blogis easy', 'blogis', 'blog is') from aaa.dbo.aaa2

    The replace needs to be in the SELECT before the FROM clause.

    'Only he who wanders finds new paths'