how to remove spaces while exporting a table into excel

how to remove spaces while exporting a table into excel

Post by sql_learne » Tue, 18 Dec 2007 23:25:22


hi....when i exported a table into excel it had many spaces on it
which created me a problem...is there any way to get rid of that
except from removing them in excel....also it would help me a lot if
there is some way to put the output of a query into an excel file
directly instead of exporting it from a table.

thanks in advance..
 
 
 

how to remove spaces while exporting a table into excel

Post by Aaron Bert » Tue, 18 Dec 2007 23:35:55

Your query can say,

SELECT
Column_Name = REPLACE(Column_Name, ' ', '')
FROM
...