Then it works correctly and it replaces the new line.
If I load a file with the exact same statement into $SQL_output it does not work.
For example this code:
$SQL_output = (Get-content $q_path)
$SQL_outputneu = ($SQL_output -replace " select \*`n", " select *")
Get-Content splits lines on line feeds as is and creates an array of strings, one line per item. In order to disable the splitting to get the behaviour you want, you will need to add the -Raw parameter. 🙂