2PTTechnology

The platform that enables you to build rich, interactive communities
Welcome to 2PTTechnology Sign in | Join | Help
in Search

carriage return from SQL to .txt

Last post 11-02-2009, 9:39 AM by twaligora. 0 replies.
Sort Posts: Previous Next
  •  11-02-2009, 9:39 AM 232

    carriage return from SQL to .txt

    when i tried using \r\n in my select and creating the text file thru .Net, nothing was happening

    select 'line one | \r\n' + 'line two | \r\n'

    so i found this 

    Declare

    @CrLf char (2)

    SET @CrLf = char(13) + char(10)

    select 'line one |' + @CrLf + 'line two |' + @CrLf

    and this seemed to work. Thanks Butch. here is the entire link http://www.sqlservercentral.com/Forums/Topic450843-23-1.aspx 

     

View as RSS news feed in XML
Powered by Community Server (Personal Edition), by Telligent Systems