SQL,How to substring a text, using Char(10)/Char(13) when there is no new line used
<p>In DB - there is 1 column and 1 row only.</p>

<p>Using query: </p>

<pre><code>SUBSTRING(p.notes,0,CHARINDEX(CHAR(13)+CHAR(10), p.notes ,1)) as name
</code></pre>

<p>When there are two lines in column all works fine.
When there's only one line, w/o newline or Enter (<code>CHAR(13)+CHAR(10)</code>), i'm getting <code>NULL</code>.</p>

<p>How to fix it ? </p>