SQL Server procedure output separate

Viewed 34

I have this procedure and I want to export the result it in txt, but instead of separating the columns with tab, I want to separate them with ||

  exec [dbo].[PNS_REL_090_090_120]
    @Empresas = '1',
    @Status_Merc = '1',
    @Dados_Emp = 0,
    @Data_Atual = 80985,
    @Data_Inicial_Compras = null,
    @Data_Final_Compras = null,
    @Data_Inicial_Vendas = null,
    @Data_Final_Vendas = null,
    @Status_Saldo = 3,
    @Tipo_Ordem = 1,
    @Ordem = 0,
    @Tipo_Relatorio = 0,
    @Arquivo=1,
    @Arquivo2=null,
    @Cod_Mercadoria = null;

I run it and it returns a normal table, this one sql-pr-result

and to save the file I was going to: file > save results as and here I can save in .csv and .txt, however in .txt it is separated by tab result.txt I want to separate them with ||

0 Answers
Related