Hi I am having difficulties with hidden characters.
I have the following and need to transfer this data to a .txt file. The query after the union works fine but the first one just wont pass through to the destination. If I put the query in a variable I get an error that there is invalid characters in the data. Please assist this line definately has to be part of the output
SELECT 'Col1, ' + 'Col2, ' +'Col3, ' +'Col4' as col1 union SELECT CAST([Col1] AS CHAR(6)) + CAST([Col2] AS CHAR(2)) + CAST([Col3] AS CHAR(4)) + convert(varchar(7),convert(decimal(18, 2), [Col4])) FROM tabel1;