>>Hi,
>>
>>When I write an error to return from a stored procedure (or trigger) what character can I use to break a line?
>>For example, in VFP I can have CHR(13) in the place where I want to break the line. What can I do with (for example) the following:
>>
>>
>>RAISERROR('First line of the message. Second line of the message', 16, 1)
>>
>>
>>What kind of character to add in the line above?
>>
>>TIA
>
>You can use CHAR(13) in SQL Server, however, in RAISERROR command you can not insert it right away. You will need to create a variable first.
>In other words,
>
>declare @ErrorMsg varchar(max)
>
>set @ErrorMsg = 'First Line of the message' + char(13) + 'Second line of the message'
>
>RAISERROR(@ErrorMsg, 16,1)
Thank you very much. The variable approach works.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham